15 Replies
      Latest reply on Nov 12, 2018 9:55 AM by TheCD
      John K. Level 1 Level 1 (0 points)

        I have a few questions.

         

        What would happen if something happened to my iMac? What if my Xcode projects somehow got corrupted? What's the best way to back up my projects in case something like that happens?

         

        Thanks,

         

        John K.

        • Re: Backing Up Xcode Projects
          KMT Level 9 Level 9 (12,975 points)

          What would happen is the same thing that would befall any data if your mac goes down. You either lose access to your files until you can effect repairs, or lose them completely if you don't have a tested and reliable backup you can restore from.

           

          At a minimum, many devs rely on a Time Machine backup, and/or source control via Xcode...see Xcode Help for detail on the current process.

            • Re: Backing Up Xcode Projects
              John K. Level 1 Level 1 (0 points)

              When you make a Time Machine backup or use source control, is it saved in the cloud?

                • Re: Backing Up Xcode Projects
                  KMT Level 9 Level 9 (12,975 points)
                    • Re: Backing Up Xcode Projects
                      John K. Level 1 Level 1 (0 points)

                      Is having all of your apps stored in iCloud sufficient?

                        • Re: Backing Up Xcode Projects
                          KMT Level 9 Level 9 (12,975 points)

                          You would backup your projects (vs. 'apps') and all related assets. The ability to restore to a point where you can continue working relies on paths...where they all are related to each other on a project level. That sort of housekeeping can vary from dev to dev, depending on workflow habits, etc. It is that individual workflow that defines the type of backup, source control etc., so asking about 'good as it gets' is like asking which flavor ice cream is the best . Same with performance...one dev's speedster is another's turtle. 

                           

                          Use backups as insurance, not as a binky. The fewer mistakes you make, the fewer times you'll have to break stride and start over. Make the habit one of getting things right, not of blindly knocking things down and standing them up over and over again hoping they just work; sooner or later. Worry about power failure and corrupted files and how you'd recover your work first, then soon enuf you can explore source control, remote access, etc.

                           

                          Time Machine makes it easy to restore to a given point in time (auto backups occur each hour...manual on your needs). You can go back an hour, or hours, or days, months, etc. as needed.

                           

                          As I said, I would put a TM backup in place at a minimum, from the start. Later, you can add to your tools and backup strategies(s) as you learn more about your needs and coding style.

                           

                          I rely on TM (hourly), local monthly mirrored backups of my working/boot drive to another drive, and a quarterly full backup to yet another drive that is kept offsite. I don't put anything in the cloud, but that's just me. I prefer to not have to rely on someone else to protect my work.

                           

                          Keep in mind that Xcode isn't like your favorite word processor...the ability to 'undo/redo' various changes is very limited, so if you're in the habit of that sort of safety net, you may need to adopt new habits when coding.

                            • Re: Backing Up Xcode Projects
                              John K. Level 1 Level 1 (0 points)

                              Thank you so much! How much memory should my external storage be for the Time Machine?

                                • Re: Backing Up Xcode Projects
                                  KMT Level 9 Level 9 (12,975 points)

                                  Are you asking about using TM to backup your boot drive or just your projects?

                                   

                                  Keep in mind that when your TM drive is full, it will delete the oldest backups to make room for newest - not something I look forward to.  Unless you're not interested in maintaining historical archives, your backup will grow over time to be larger than just the sum of your current projects.

                                   

                                  Since I use TM to backup my entire boot drive and I want to keep everything as far back as I can, I always make it larger. 2 TB boot gets a 3 TB TM, as an example. When my boot gets under 250 GB free space, I buy a larger drive for TM, clone the old TM to it, and make the old TM drive my new boot drive. Wash/rinse/repeat. All drives are high speed so they perform the same regardless of duty. This allows me to keep all of my projects since day 1, at my finger tips, which for me was March, 2009. Right now I have a total of 8.5 TB online and spun up. Maybe another dozen TB switched off but still on the chain.

                                   

                                  If you're planning on buying a new mac for dev work, figure out how much drive you need, then double it, then double it again. Drives are cheap, but they fill up quickly when making apps and you don't want to spend your time juggling free space and new drives. Free space is critical, by the way. When you decide on what size boot drive you can live with, and you intend to backup all/most of it, get a larger TM drive and relax. Don't forget to test it before you need it, and if you're really serious, add a UPS to your system.

                                   

                                  Also, we don't call drive space 'memory' Memory is ram. Drive space is storage.

                      • Re: Backing Up Xcode Projects
                        John K. Level 1 Level 1 (0 points)

                        Thank you! Is there anything else I should do just to be safe, or is the Time Machine as good as it gets excluding preference?