Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Small backups

Discussion in 'Getting Started' started by LumoKvin, Dec 21, 2019.

  1. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    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?
     
  2. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    Push to GitHub/GitLab?
    I do this daily.
     
  3. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    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?
     
  4. Deleted User

    Deleted User

    Guest

    You only need to keep the Assets, Packages and ProjectSettings folders. The rest would be rebuilt when you load them into Unity.
     
  5. LumoKvin

    LumoKvin

    Joined:
    Sep 28, 2019
    Posts:
    195
    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.

    upload_2019-12-21_12-36-38.png
     
  6. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    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.
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    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).
     
    LumoKvin likes this.
  8. Deleted User

    Deleted User

    Guest

    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...
    :D
     
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    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.

    https://www.wikihow.com/Make-a-Zip-File
     
    Antypodish likes this.
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Yep definitely zip shrinks project folder by much. So combining multiple approaches, will reduce overall backup size.