Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Best way to make automatic unity project Backups?

Discussion in 'Getting Started' started by MrDasix, Jul 19, 2016.

  1. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
    I have sourcetree downloaded and an account of bit bucked created but i really do not know how to use it.I want to learn but for the moment i can't. The thing is that i just finished one project and im afraid of it if is being erased by my pc or if my pc stops working for ever.
    Someone knows a program to make a automatic backup of the project folder and some additional folders to google drive, dropbox and local files if i make something wrong to the project.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    Yes, if you haven't already spent years fighting with git, there's no sense in doing that to yourself now.

    I do recommend you learn a version control system at some point, though I recommend svn (Subversion), because it's dramatically easier to use.

    But if you just want a backup, then grab your project folder, and drag it onto whatever flash drive, external hard drive, or DropBox folder is at hand.

    If you want automatic regular backups, and you're on a Mac, then I recommend using Time Machine. An alternative that works on anything is DropBox. Yes, you can keep your entire project folder in DropBox, though it will also be backing up all that crap that Unity insists on spewing into the Library folder instead of keeping it in a more appropriate place (like Application Support in the case of a Mac). That's a lot of stuff, but harmless as long as you have plenty of room in your DropBox account.
     
    MrDasix likes this.
  3. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Fascinating. I found Git to be infinitely easier to wrap my head around than Subversion. It may be because I tried Subversion first and was still trying to understand the concepts of version control, though. To each, their own!

    @MrDasixMr I also recommend you spend a bit of time to figure out some form of source control, as it can really save your butt if/when something goes wrong. But like Joe said, if you're just looking to cover yourself against catastrophic loss, consider something like a free Dropbox or Google Drive account, which gives you 5GB of space you can use to keep the latest version of your files safely tucked away in the cloud. Even better, you can set your shared folder to your project directory so that as you save, your files are immediately backed up! (Bear in mind, this will annoy the crap out of you with notifications of file transfers, and you might not want to do this if you plan to sign in on multiple computers!)
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Git is pretty straight forward if you use a UI client. GitHub Desktop and SourceTree are both good.
     
  5. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    587
    Mercurial might be easier to understand. But also git is pretty easy to use with Source Tree. Here is a tutorial you can follow to set it up. Source control will make your life so much easier once you get the hang of it. No more lost code, no more ripping your hair out when you try new code that doesn't work, it's a life saver.
     
    MrDasix likes this.
  6. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
    But a thing that i dont understand, the destination path should be the unityproject folder or an empty folder?
     
  7. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    587
    When you create a new repository, use an empty folder. Then copy your Unity project into it. Be sure to use the correct .ignore settings to blacklist the files that aren't needed.

    I believe only Assets and ProjectSettings folder need to be saved into version control.
     
    jhocking likes this.
  8. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    813
  9. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
    But later of doing this i have to work in unity with the new folder or with the old folder and always when i finish move the project folder to the repository folder?
     
  10. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    587
    You work in the new folder. Just open project and point Unity to the new 'repository' folder after you have copied the files over.
     
    ZenMicro and MrDasix like this.
  11. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,032
    Don't forget a good .gitignore file to avoid checking in things you shouldn't. Also be warned that Git isn't great for binary data - there are dedicated version control systems geared more towards game development and such, like Perforce.

    Git has alternative tools like git-annex available, but you might as well ignore folders with binary files then. A simple 2D project shouldn't be a problem, but 3D models might be better off backing up manually and ignoring.
     
    Kiwasi likes this.
  12. MrDasix

    MrDasix

    Joined:
    Feb 15, 2015
    Posts:
    64
    But then why i create a new empty folder? It's not easier setting the repository folder to unity project original folder?
     
  13. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    587
    Well you may or may not erase all your original files if you do this, best to start on a new folder when trying something new. (Save and save often, same applies to backing up).
     
    Schneider21 likes this.
  14. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    It's very easy to erase files permanently if you don't know what you're doing with Git. You can certainly work in the folder you've been using, but make sure you do an old fashioned copy-and-paste backup first, then.
     
    MrDasix and xjjon like this.