Title: Zip creation process
Last modified: August 31, 2016

---

# Zip creation process

 *  Resolved [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/)
 * I had an issue where backups stopped working. While researching it (another plugin
   caused the problem) I noticed the process of creating the zip files is as such:
   
   1. Create <long file name>.tmp.XXXX file of a few MB 2. Copy <long file name>.
   tmp.XXXX to <long file name>.tmp 3. Create <long file name>.tmp.XXXX file from
   scratch up to a few MB more than previous size 4. Repeat steps 2 and 3 until 
   zip process is done
 * I looked at the FAQ and did some web searches to try and understand why the zip
   files are recreated incrementally. The final size of my plugins backup is 27MB,
   but that requires creating a 5MB, 9MB, 13MB, 17MB, 23MB, and finally 27MB files.
 * This happens with both binary-zip option enabled and disabled. I even used the
   php script on the back-end with both options and the behavior is the same.
 * Is this by design?
 * [https://wordpress.org/plugins/updraftplus/](https://wordpress.org/plugins/updraftplus/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/#post-7076061)
 * Hi,
 * That’s the behaviour of the zip engines themselves; that’s how they add files
   into a zip – by copying it, working on the copy, and then replacing the original.
 * You can get UD to ask them to process more files in a go by setting this define
   in your wp-config.php:
 * > define(‘UPDRAFTPLUS_MAXBATCHFILES’, 1000);
 * The default is 500. You can experiment to see what your hosting setup’s timeouts
   can allow. The default of 500 is chosen to be a conservative starting point on
   most hosting setups. (If set too high, then you risk nothing happening. But if
   your PHP timeout is itself high, then you get better performance with a higher
   number).
 * David
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/#post-7076088)
 * Thanks for the explanation and quick reply.
 * Indeed, using the setting you describe does improve performance and reduce the
   number of copy operations.
 * I was unable to eliminate the copy operation entirely, even when I set the parameter
   to 10,000 and only 4,000 files are processed. The copy was done at 10MB and 18MB(
   out of a final size of 25MB).
 * Any ideas as to why?
 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/#post-7076107)
 * There’s also chunking every 25Mb of raw data. UD adjusts this 25Mb dynamically
   upwards or downwards, as it measures the server’s performance during the backup.
 * David
 *  Thread Starter [yk11](https://wordpress.org/support/users/yk11/)
 * (@yk11)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/#post-7076110)
 * Understood. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Zip creation process’ is closed to new replies.

 * ![](https://ps.w.org/updraftplus/assets/icon-256x256.jpg?rev=1686200)
 * [UpdraftPlus: WP Backup & Migration Plugin](https://wordpress.org/plugins/updraftplus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/updraftplus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/updraftplus/)
 * [Active Topics](https://wordpress.org/support/plugin/updraftplus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/updraftplus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/updraftplus/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [yk11](https://wordpress.org/support/users/yk11/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/zip-creation-process/#post-7076110)
 * Status: resolved