Results 1 to 10 of 38

Thread: RLBackup (Rsync Local Backup). An easy way to backup your system

Threaded View

  1. #37
    Join Date
    Dec 2006
    Beans
    717
    Distro
    Xubuntu 13.04 Raring Ringtail

    Arrow Re: RLBackup (Rsync Local Backup). An easy way to backup your system

    Quote Originally Posted by scooter28 View Post
    Old thread I know, but I was wondering how you restore using this backup script. i.e. if I back up from / but only need to restore my boot partition or /home, how would I do that? I probably should have asked before I used the script and set up the cron job, but I figured better late then never.
    Well the quick answer is any way you like, as they are just files that can be copied as normal.

    Or you can have a look at my restoration plan below...
    __________________

    My plan if I need to copy more than a few files is:

    1. Install Ubuntu via LiveCD (So I am immediately back in business).
    2. Copy /home (bits of etc and anything else I need) from my backup USB Drive.
    3. Reinstall all my old applications with one click. Install Packages from a list

    For 2. I will probably just use the RLB script with altered source and destinations info (and no link destination).

    __________________

    Other ideas...

    This sounds good as well, but I haven't tried it yet.

    Quote Originally Posted by paulisdead View Post
    When you do the restore, the /proc and /sys folders need to exist, but don't need anything in them. They're not actually folders on the disk, but a representation of the running kernel in memory.

    If I've got a full backup including the binaries, or just want to transfer an existing install to another drive, I wouldn't do a full reinstall. In the past, I took a livecd, partition the drive, mount all the partitions into the running livecd's os to somewhere like /mnt/ubuntu. Then I copy all the files back into place. It's very important to make sure your backups preserve permissions, and when you restore that you keep the original permissions. A 'cp -Rp' will do it (note the capital R, so it picks up hidden files/folders), as will 'rsync -ar' work. Once the files are copied in place, you need to fix up the fstab. Use blkid to determine the new UUIDs of the partitions, and then put them into the new fstab. You then need to mount /proc and /dev from the livecd's folders into the copied folder for the next step. You can do it like this 'mount -o bind /proc /mnt/ubuntu/proc'. The final step is to reinstall the bootloader by cd'ing into the new install and chroot into it, 'chroot /mnt/ubuntu /bin/bash' then a grub-setup && grub-install should do it, and you can exit and unmount everything and reboot.
    __________________

    A Note about copying and permissions:

    Quote Originally Posted by nilleso
    cp -p and/or scp -p will probably work for you

    ...from cp man page
    -p Preserve. cp duplicates not only the contents of
    source_file, but also preserves the owner and group
    id, permission modes, modification and access time,
    ACLs, and extended attributes, if applicable. Notice
    that the command may fail if ACLs are copied to a file
    system without appropriate support. The command will
    not fail if unable to preserve extended attributes,
    modification and access time, or permission modes. If
    unable to preserve owner and group id, cp will not
    fail, and it will clear S_ISUID and S_ISGID bits in
    the target. cp will print a diagnostic message to
    stderr and return a non-zero exit status if unable to
    clear these bits.

    In order to preserve the owner and group id, permis-
    sion modes, and modification and access times, users
    must have the appropriate file access permissions.
    This includes being superuser or the same owner id as
    the destination file.
    http://www.linuxquestions.org/questi...ssions-480735/
    Last edited by SilverWave; November 19th, 2010 at 11:58 PM. Reason: My Plan...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •