When I do a backup, I copy the entire project folder. The project folder is around 4GB. Is there a way to reduce the size? What is the minimum that needs to be backed up in order to restore a project in the future?
Push to GitHub/GitLab?
I do this daily.
Good idea. I watched a few youtube videos about doing this. However, what I am mostly interesting in knowing is what I should be backing up. Do I need to backup the entire project folder?
You only need to keep the Assets, Packages and ProjectSettings folders. The rest would be rebuilt when you load them into Unity.
Thanks. Some people say that the best way to backup assets is to export it as a package, which can be imported into a new project. Is this a good way to do it, or should I just copy and past the folder.
Use this .gitignore file:
https://github.com/github/gitignore/blob/master/Unity.gitignore
Simply rename it to “.gitignore” and place in your root project folder.
This will ensure that you only need to commit and push (i.e. backup) the necessary files and not any temp files.
Or if backing up manually, just note that you should skip the “Temp” and “Library” folders (the latter is where most of that 4GB is going).
It’s really up to you. Try everything:
- copy and paste your project keeping only the Assets, Packages and ProjectSettings directories (and the UserSettings one if you have it) ,
- make a custom package out of it,
- do both…
When they said it was good for backing up assets they likely didn’t mean the entire project as it won’t export everything related to the project. Just the assets. For saving an entire project there are multiple ways but the easiest is to use a zip archive. Check the link below for instructions for your OS.
Yep definitely zip shrinks project folder by much. So combining multiple approaches, will reduce overall backup size.