Announcement

Collapse
No announcement yet.

Backing up mail files from 11.04

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

    Backing up mail files from 11.04

    I'm preparing to do a clean install of 12.10 over 11.04 and would like to back up my working files before doing so. I have an external HDD that I have historically just copied the home folder contents (including hidden files to, but it always complains about the files in Mail and ends up not copying most of them. FWIW, I've always made sure that I was out of any mail services before doing the copies, but that doesn't seem to matter.

    So, what is a good way of doing this backup prior to the install? Is there anything special I should consider in the restoration process should the need arise?

    The /home partition is separate, so I'm not expecting it to get affected in the process, but I always like to backup my data before one of these exercises.

    Thanks.
    Bill Lugg

    #2
    rsync is a very good tool for backing up a folder or drive. It manages to preserve permissions, dates and everything, and even works with sparse files.

    -avS is a good set of options to start with.

    http://linux.die.net/man/1/rsync

    There's probably a more user-friendly backup tool though.
    --
    Intocabile

    Comment


      #3
      Well I tried it and found a couple of things. First, in the Mail folders I got a lot of this kind of error:

      Code:
      rsync: mkstemp "/media/My Book/Backups/tahoe/luggw1/Mail/.Carol.directory/Telescopes/cur/.1225727190.6497.jQPLM:2,S.Fq9rhp" failed: Invalid argument (22)
      FWIW, there are 8 messages in the folder in question and 21 errors were generated, presumably for each of 21 supporting files in the underlying file structure. I don't know anything about how the maildir structure is put together, but these messages would lead me to believe that this and several other folders didn't get backed up.

      The other one I saw was this:

      Code:
      rsync: symlink "/media/My Book/Backups/tahoe/luggw1/.wine/drive_c/users/luggw1/Desktop" -> "/home/luggw1/Desktop" failed: Operation not permitted (1)
      So, it looks like it's having trouble preserving symlinks too.

      Now, as I was watching this take place, it occurred to me that the external HDD is formatted as a FAT32 partition so I can use it in Windoze too. Could that be causing the problems I'm seeing? Do I need to create an ext3 partition on it to back up my ext3 data?

      Thanks for the help
      Bill Lugg

      Comment


        #4
        FAT will not maintain Permissions for sure. I use the PartedMagic LiveCD with Clonezilla and it's rsync module for whole partition backups. No problems with that at all. I usually even set things so that I have a maximum of 4 GB files so I can burn a DVD for off-site backup. The original is kept on an external HDD onsite. And I'd use Ext2 for backup HDD media. No need for a Journal.
        GigaByte GA-965G-DS3, Core2Duo at 2.1 GHz, 4 GB RAM, ASUS DRW-24B1ST, LiteOn iHAS 324 A, NVIDIA 7300 GS, 500 GB and 80 GB WD HDD

        Comment


          #5
          I would need to see the rsync commands you used to be able to comment.

          Are you running rsync as root?

          If you want to put the backup onto a FAT32 disk, and preserve permissions, look at using dump and piping it though gzip or similar.

          Something like: dump -0v -f - /home/user | gzip -1 /path/to/backup.gz
          --
          Intocabile

          Comment


            #6
            This was the command I used, not as root:

            Code:
            rsync -avS /home/luggw1 /media/My\ Book/Backups/tahoe
            HTH
            Bill Lugg

            Comment


              #7
              Try it as root. Although there seems little point if you're using fat32 to store the files on as it won't understand the permissions.

              Your other option is to dump the entire /home filesystem into a gzip. You might want to unmount it first, however.

              Code:
              dump -0v -f - /dev/{your home partition here) | gzip -1 /media/My\ Book/Backups/tahoe/backup.gz
              See http://linuxmafia.com/faq/VALinux-kb...ory-trees.html
              --
              Intocabile

              Comment


                #8
                So, I created an ext2 partition on the external HDD and reran the rsync command mentioned above. It ran slicker than scum on a Louisiana swamp.

                One wrinkle I stumbled across is that when the partition mounts, the mount point is owned by root and it's in the root group, so you can't write anything into it. I started fiddling with the fstab to try to get it to mount owned by the user, but got to thinking that I'd have to make this mode on all my machines, so I instead created a folder that's owned by me and in the users group. That should fix the problem without a lot of config troubles every time I upgrade.

                Thanks for all the help.
                Bill Lugg

                Comment

                Working...
                X