Search Unity

Do you use SSDs for development? / backups, version control

Discussion in 'General Discussion' started by Shushustorm, Sep 20, 2015.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Well, it could copy the code files, couldn't it? I just don't want all those textures and 3d meshes to be versioned, too.
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Your version control and your backup can be the same thing. Especially if you're using something like Git (where every repo can contain all the data) and have a physically remote server to push to.
     
    Shushustorm likes this.
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Alright, maybe I am looking at this the wrong way, but I was thinking I could just use Time Machine (and maybe Carbon Copy Cloner or SuperDuper!) for backing up my entire disk and keep all the version control data on my internal SSD, with only the code being versioned so I don't end up with huge amounts of data.
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Technically yes. However not having distributed control does leave you vulnerable to single cause failure.

    Trust me. I'm not about to try and hack bit bucket to steal the source to your MMO any time soon. I'm too busy attempting to break onto @zombiegorilla's system to get a copy of that game his collueges are working on.
     
    zombiegorilla, Ryiah and Shushustorm like this.
  5. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    By "elsewhere" I meant physically. A different computer or NAS device at the least. Preferably a computer or server at a different location.

    I version my whole Unity project folder, minus the temp, obj, and Library folders. I include all art. The point is that I can go to a completely new computer, do a "pull", and have a complete working project ready to go when it's done. This isn't just for portability, it's critical for teamwork - you don't want multiple team members to have to individually maintain disparate Unity project folders.
     
    Ryiah, Kiwasi and Shushustorm like this.
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    Yeah, that would work. I personally wouldn't go that way because of the loss of portability and sharing between team members, but for a one man team who mostly/only works with one machine it'd be fine.
     
    Shushustorm likes this.
  7. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Alright, that sounds great then! And yes, I don't have a team that I work with, so I don't really need to be able to share the most recent changes.

    Awesome! I guess I'd be fine then! In all seriousness, though: I maybe somewhat paranoid, but that's just the way it is.
    Well, maybe I will reconsider this after a while if I can only upload the versions for my code, too, not including all the media files.
     
    Last edited: Sep 21, 2015
  8. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    It has an embedded version, and so does Xcode. But this is what I recommend: http://brew.sh

    Once you've got Brew set up, run "brew install git" or "sudo brew install git" (depending on whether you ran with defaults, or made its directory owned by you). Now you're on the latest version of Git, and all is well.
     
    Shushustorm likes this.
  9. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    SourceTree is a client only though, right? From memory it has nothing to create new repositories. Not a big deal in the long run, but a potential stumbling block to getting started. (Probably addressed by your brew suggestion?)
     
  10. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    These are many things all at once, so for starting, I would try to use SourceTree as is if that works for me.
     
  11. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    It has a create repo button, so no problem. Embedded Git with all the features :)
     
    Shushustorm and angrypenguin like this.
  12. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    Yep, if you haven't already started using Git it'll be fine. It's when you mix the included Xcode version of Git with potentially different versions that things can be tricky. At least once a default was reversed.
     
    Shushustorm likes this.
  13. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    No worries. I did the same thing when I started with version control. I downloaded GitHub desktop. Set up a local repo and went from there.

    Later I set up a remote repo and so forth. The two tasks are seperate, so you don't need to learn them at the same time.

    I still prefer GitHub Desktop over Source Tree. It's far simpler to work with, even through it's less powerful. But on your own you don't need that much power.
     
    Ryiah and Shushustorm like this.
  14. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I haven't used Git before and just installed SourceTree and tried using it. Setting a Unity project folder as "Working Copy" seemed to work fine and I tried hitting the "Commit" button, with "Selected files" selected, but there was a "fatal error" that said there is no author found with my name. Do I have to register? And / or is "Commit" automatically trying to upload to a specific user's account?

    Setting up the ignore list was a bit of a hassle, though. I can only ignore in a positive way, instead of telling SourceTree what file types to not ignore. Then, I could just say .cs and .js, but like that I always have to add new ignores when adding some file types I haven't had in the project before.

    Also, after hitting commit, the "Files in the working tree" were moved to "Files staged in the index" and I can't seem to be able to ignore new things there. So once I setup my ignore list, it cannot be changed?
     
  15. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    You should probably read a tutorial on Git :)
     
    Shushustorm likes this.
  16. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    SSDs are more reliable then magnetic media because they have no moving parts and the heat that can break magnetic HDs or corrupt their stored values does not effect SSDs.

    I've used my SSD (Mushkin 240) since September 2012, multiple installs and much read/write cycles and even after the EP121 housing it overheated and the lithium ion batteries blew up in it the SSD kept it's data intact. I am now using it with another SSD as a SSD JBOD SPAN in a dual SSD to SATA adaptor as my boot disk in an old HP 8460p.

    Also, with SSDs users are more likely to do backups as the backup process is much faster. If 3% of your data is that important to you and you are not doing backups, well then, you just don't sound believable.

    By the way the dual SSD to SATA card I have can do raid 0 and raid 1 so data protection and redundancy isn't a problem.
     
  17. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Personally, I have SSDs in my laptop and in my desktop workstation and I've never had an issue with either. Once is a 250GB (laptop) and the other 500GB. Both are the Crucial MX series. There are SSDs with slightly better performance, but overall reviews of these drives were good and the price range was good (mid range in price, not cheap and not terribly expensive).

    As for configuration, I still also have SATA platter drives. My laptop has a 1TB platter drive. My desktop has a 500GB, 2x 1.5 TB, and one 3 TB platter drive. On both systems, I use the SSD as my OS drive. Since I have platter drives, I disabled the page file on my SSD and made sure my page file goes on my platter drive (on my laptop) to avoid extra writes. On my desktop, I have 32 GB of RAM so I disabled my page file entirely.

    I install Unity and some other apps on one of the platter drives. So, my SSDs are used for OS and most applications. Things that write frequently, like my Unity projects I still store on my platter drives. It offers a good tradeoff because I still get screaming fast performance, good boot times, etc. but I avoid unnecessary writes to the SSDs so I don't put as much wear on them.

    Really it's up to you. Your SSD will still last a long time. It might last just as long as a standard IDE drive. I have had those last for 15+ years, but I've also had dead ones new in the box so I don't see it as any different. As the SSDs degrade, the drive is smart and marks those degraded sectors as unavailable so it wont' write to them. I have yet to run into any data corruption at all so it's not something I'd worry about as long as you do your research and buy a reliable, reputable drive.

    As for backups, I use CrashPlan (in addition to source control) because it does versioning of the files as well. You can create custom backup sets. I have a backup set for my development files that creates a new version every 15 minutes, so if it does get corrupt I can roll back to a previous version right out of the cloud. It's really slick. It even will save deleted files for the amount of time you specify (anywhere from never to forever), so if corruption did result in a missing file, it's still recoverable.
     
    Ryiah and Shushustorm like this.
  18. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    By the way, with Windows 10 and other newer versions of Windows (e.g. 8) they have file versioning and creation of sets too built in.
     
  19. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I just watched those, which are pretty informative regarding version control using SourceTree: (just in case someone actually hasn't used version control before like me)



    But: He changes Unity's Version Control Mode to "Visible Meta Files" and Asset Serialization Mode to "Force Text". Is this actually required? Because I haven't done that and SourceTree showed me the meta files anyway.
     
  20. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Yes because the version control systems will do merging, etc and they will only store diffs which they can't do (reliably or at all) with binary files. That's why they need the meta files and text. It will make your build times a little longer but it's necessary.
     
    Shushustorm likes this.
  21. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Setting serialisation to text also lets you actually see the changes in you files and decide to keep or reject the changes. Unity's serialisation system becomes surprisingly intuitive once you start doing version control regularly.
     
    Shushustorm likes this.
  22. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I'm quite confused, though. I didn't set serialization to text, nor did I turn on meta files.
    Yet, I was able to have meta files in SourceTree and decide whether or not I want to keep changes.
    Also, MonoDevelop freaked out: A menu bar on the bottom has been added, which included buttons that led to windows for source control. (which I wasn't able to get rid of besides actually removing git again)
     
  23. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    That's because some files are stored in text and/or with meta files anyway. The option for the editor lets you force all files to be stored that way, rather than just the ones which do it by default.
     
    Dustin-Horne and Shushustorm like this.
  24. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I see. Thanks for your help everyone! I guess I understand this better now!
     
  25. latas

    latas

    Joined:
    Oct 9, 2013
    Posts:
    149
    I'm using Drobo Mini. It has 4 drives slots. It does hardware mirroring RAID 1, RAID 5, but you can select other type of RAID for redundancy. I plugged 4 SSD drives. 2 Drives of 1TB SSD each one, and 2 Drives of 512 GB each one. That provides to me 1,78 TB of real usable space, with redundancy. It is connected thru thunderbolt to my iMac. I'm also using git with SourceTree (Atlasian). It works very good and fast.