Unity – Project Backup

      Comments Off on Unity – Project Backup

When I first started doing Unity development I spent time investigating various backup and source control solutions. What I came to find was that if you’re doing a project that utilizes more than a few 3d models, audio files, and so on your project an easily reach several GB in size. In the end I decided to go with a custom solution, executing a program to clean and zip the project directory. Then, I move that zip into a backup location. Any cloud provider such as google drive or dropbox will do provided you have enough space. I chose to go with Amazon Glacier backup, which charges a very reasonable rate based on the amount of storage you use, and the amount of bandwidth you use.

The backup code I wrote runs as a windows shell extension, but can be run from the command line with the project directory as an argument. The backup simply copies the directory to the windows temp directory, deletes the library and obj directories which unity generates when it opens / builds the project, and zips it up and moves the zip back to the original directory location. The code with the compiled executable are both included, as well as the .reg file that you can edit and run if you want to use the backup as a windows shell extension.

To use it you just need to update the last line with the path where you will save the Unity3DBackup.exe, so that the shell knows where the exe to run is located.

You can check the rates for Glacier to see if it’s right for you:


Fast Glacier is a good windows app for uploading to Amazon Glacier:


The backup project Code:


Just the executable and .reg file:

Backup Runtime