Announcement

Collapse
No announcement yet.

Guide: How To Backup Operating Systems

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Guide: How To Backup Operating Systems

    I have posted a new Wikibooks guide "How To Backup Operating Systems"...
    http://en.wikibooks.org/wiki/How_To_...rating_Systems

    This guide extends on the information in the older guide here...
    http://kubuntuforums.net/forums/index.php?topic=13735.0

    Comments and suggestions are welcome.
    Check out my blog for useful scripts and tips... http://igurublog.wordpress.com

    #2
    Re: Guide: How To Backup Operating Systems

    here is the most simple guide ever, backup your hall disk or partition in a sec

    http://scripts-net.com/viewtopic.php?f=6&t=73

    Comment


      #3
      Re: Guide: How To Backup Operating Systems

      @IG: Interesting and clear guide.

      Comment


        #4
        Re: Guide: How To Backup Operating Systems

        My latest kick for backups is using rsync to make an entire duplicate of my hard drive on an external USB 2.0 drive. I have a 500 GB USB Drive that I have two partitions on (each 250), my Primarily drive is a 250, and I use rsync to make 1 full copy and then have it only update the files that change every 2 hours.

        When it updates a file, I have it backup the original based on the date and time it ran. No compression, no worrying about space until the backups begin to take their toll, but for the most part, the backups are only the files I change often, and I have the piece of mind of being able to go back two hours ago, or 2 days ago.

        I'll post the script I use when I get back home late tomorrow evening. In a nutshell, if you have the space to do it, I believe it is a very sound and good idea to make an uncompressed backup. Saves time in restoring any files and not having to have the space to restore 2 GB of data, you just have to copy the 1KB file you need.

        Matt

        Comment


          #5
          Re: Guide: How To Backup Operating Systems

          cpradio,
          Sounds like a useful topic. In fact, a basic how-to on using rsync at Konsole might also be interesting & useful. I've not used it yet, but keep seeing it pop up here and there in Linux circles. (I've used dd and have done a how-to on that here somewhere @ Kubuntu.)


          The following is related and demonstrates a use of rsync

          HOWTO: Copy kubuntu system, Rog131
          http://kubuntuforums.net/forums/index.php?topic=11116.0
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Guide: How To Backup Operating Systems

            Here we go. I found the original article I read that got me started with rsync, but I did alter mine as it had a few side effects I did not like.
            http://matthewhelmke.net/wordpress/2...-up-my-laptop/

            BTW, I strongly recommend that everyone add the feed:
            http://planet.ubuntulinux.org/rss20.xml

            It has a LOT of good information that gets posted daily and many of which I strongly recommend as good reads. All Linux based, and mostly Ubuntu/Kubuntu based too, though some could be generalized to Linux as a whole.

            Anyways, back to rsync.

            I took his example of
            Code:
            sudo rsync --force --ignore-errors --delete --delete-excluded --exclude-from=/media/disk/matthew-exclude.txt 
            --backup --backup-dir=`date +%Y-%m-%d` -av / /media/disk/backup/matthew-laptop
            And change it to:
            Code:
            sudo rsync --force --ignore-errors --delete --delete-excluded --exclude-from=/media/backup/<username>-exclude.txt 
            --backup --backup-dir=/media/backup/<username>-backups/`date +%Y-%m-%d` -av / /media/backup/<username>
            Now here is why, if you do not declare an absolute path for the backup directory, it does a relative backup. Meaning, your /media/backup/<username>/ will have a backup folder, so will /media/backup/<username>/home, etc.

            I wanted all of my backup folders/files to be in a central location. It will still create the tree structure for my backups, but it won't mix them into where my actual files are backed up to.

            Example:
            /home/<username>/MyFile1.txt

            Using the command by Matt H., it would back that file into /media/backup/<username>/home/<username>/2008-06-14/MyFile1.txt

            With my change, it goes into:
            /media/backup/<username>-backups/2008-06-14/home/<username>/MyFile1.txt

            Its' a personal choice, but I feel most would prefer my approach.

            Enjoy.

            Comment


              #7
              Re: Guide: How To Backup Operating Systems

              @cpradio: Down in the discussion of the blog post you reference, there is a comment to the effect that there is a bug report in Launchpad saying that the version of rsync used in HH hangs for large files. it recommends the use of the Debian (Unstable) package which has a newer version of rsync in which the purported bug has been repaired. However, the Ubuntu developers don't seem to be too concerned. Have you encountered any difficulties?

              Comment


                #8
                Re: Guide: How To Backup Operating Systems

                No I haven't and I honestly didn't read any of the comments (as I just got the idea from the feed I subscribed too). I have several files that are a few megs each and they backup just fine.

                I can't say I have any over a gig, that are being backed up, but to my knowledge all of my data has always successfully backed up and the program has finished/completed in about 20+ minutes (after the initial backup). The initial backup took about 2 hours as it copied every file, from then on, only the changed files needed to be copied.

                I'll give it a test later this week with a large file. I have had it backup ISO files which were 750+ megs, but I'd be interested in seeing what it does with a 1 gig file.

                Matt

                Comment


                  #9
                  Re: Guide: How To Backup Operating Systems

                  IgnorantGuru - many thanks for the wiki - it is clear and detailed. I especially like your detail on MBR's.

                  There is one thing that I would like added - backup for encrypted partitions.
                  I'm using Kubuntu 8.04 and it allows encryption on installation, which is great for encrypting /home, swap and /tmp.
                  I haven't found anything yet, that allows simple backup of encrypted partitions.

                  I'm using an external hard drive, encrypted with dm-crypt, and tar to copy the files I want to that.
                  Do you have any advice about backup of encrypted partitions? Thanks.
                  HP Compaq nc6400, 2Gi, 100Gi, ATI x1300 with 512M

                  Comment


                    #10
                    Re: Guide: How To Backup Operating Systems

                    Originally posted by kevinc
                    There is one thing that I would like added - backup for encrypted partitions.
                    I'm using Kubuntu 8.04 and it allows encryption on installation, which is great for encrypting /home, swap and /tmp.
                    I haven't found anything yet, that allows simple backup of encrypted partitions.

                    I'm using an external hard drive, encrypted with dm-crypt, and tar to copy the files I want to that.
                    Do you have any advice about backup of encrypted partitions? Thanks.
                    Thanks kevinc. I don't know enough about encrypted partitions to add that to the wiki. But AFAIK, because the filesystem is encrypted, a tool like partimage won't be able to read the partition. I think the simplest backup method for such a partition would be to copy the partition using the dd command. This way the encrypted data is copied to the destination with encryption intact. This is discussed here... http://ubuntuforums.org/showthread.php?t=880443

                    However, as that discussion notes, restoration to a different drive may be tricky (due to the UUIDs ,etc). Thus copying files to another encrypted partition (as you have been doing) may be your most reliable backup option.

                    Check out my blog for useful scripts and tips... http://igurublog.wordpress.com

                    Comment


                      #11
                      Re: Guide: How To Backup Operating Systems

                      AwesomeMachines states (in big red letters, toward the beginning of his how-to): "Warning!! Caution should be observed when using dd to duplicate encrypted partitions."
                      He doesn't say why, but you could read the thread (maybe someone has addressed it) then post to investigate further.
                      Learn the dd command:
                      http://www.linuxquestions.org/questi...ommand-362506/
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        Re: Guide: How To Backup Operating Systems

                        Originally posted by Qqmike
                        That is one marvelous tutorial -- thanks Mike! Although, I must say that "dd" is one of those operations that makes me want to physically disconnect my "real" hard drive (the one with the OS that I care about) before I issue the command. :P Call me "chicken" .....

                        Comment


                          #13
                          Re: Guide: How To Backup Operating Systems

                          IgnorantGuru,

                          Many thanks for that link. I had searched without finding it. Thanks also for your great advice.
                          I appreciate it and will try dd with a spare flashdisk - I've only got one external hdd at this time.

                          Backup is a very important topic and with rapidly changing technology and options - something that needs constant revision.
                          HP Compaq nc6400, 2Gi, 100Gi, ATI x1300 with 512M

                          Comment


                            #14
                            Re: Guide: How To Backup Operating Systems

                            Gosh! Beautiful. Thank you.

                            Comment


                              #15
                              Re: Guide: How To Backup Operating Systems

                              A fairly major edit to this book was posted today which includes an expanded section on the MBR & boot process, how to backup and restore the partition table (including extended partitions), and other additions.

                              http://en.wikibooks.org/wiki/How_To_...rating_Systems

                              Check out my blog for useful scripts and tips... http://igurublog.wordpress.com

                              Comment

                              Working...
                              X