Page 63 of 138 FirstFirst ... 1353616263646573113 ... LastLast
Results 621 to 630 of 1375

Thread: Howto: Backup and restore your system!

  1. #621
    Join Date
    Dec 2006
    Location
    Lawton, OK
    Beans
    345
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: Howto: Backup and restore your system!

    subscribe

  2. #622
    Join Date
    Dec 2007
    Beans
    119

    Re: Howto: Backup and restore your system!

    I remember seeing somewhere in the thread how to make a log based off this backup script. can someone link me? my backups started failing for no reason....

  3. #623
    Join Date
    Jun 2008
    Beans
    16

    Smile Re: Howto: Backup and restore your system!

    This thread is awesome! I use this information to routinely tar my Ubuntu partition, and copy it to other partitions to allow multi-boot, etc.

    This is what I do:

    To copy Ubuntu installation:
    1. Boot from live CD (or boot into another Linux partition if avail)
    2. Let's say that the installation we want to copy is mounted at /media/disk-1, and we want to store the archive in the volume /media/DATA... first cd /media/disk-1, then type:
    sudo tar cvpzf /media/DATA/ubuntu_backup.tgz *

    To unzip Ubuntu archive:
    1. Boot in Live CD mode or else in a second Linux partition
    2. Let's say that the target volume is mounted at /media/disk-1, and the archive is stored in the volume /media/DATA... first cd /media/disk-1, then type type:
    sudo tar xvpfz /media/DATA/ubuntu_backup.tgz
    3. ***BEFORE*** rebooting the computer, if the target partition was reformatted before the restore, then it is necessary to change the UUID of the formatted partition back to that of the original installation. Do the following:
    a) find out the UUID of the target drive by opening the file "/etc/fstab".
    e.g., # /dev/hda1
    UUID=558a338f-ebc1-4050-82f2-086da21170af / ext3 ...
    b) change the UUID of the target partition back to what the fstab file expects:
    sudo tune2fs /dev/hda1 -U 558a338f-ebc1-4050-82f2-086da21170af
    c) now you can reboot the computer
    4. If the target partition is different than the original backup partition, and if the target partition holds the active grub application for the disk, then (before reboot) edit menu.lst and fstab and modify the UUID's for each partition as required in each file (the command "blkid" prints the UUID's of each partition on the computer):
    /boot/grub/menu.lst
    /etc/fstab
    Then reboot the computer.

  4. #624
    Join Date
    Jul 2008
    Beans
    89

    Re: Howto: Backup and restore your system!

    I bumped this old thread earlier. I'm a 3 week Linux newbie and I'm just wondering if anyone is using this script that lunde wrote. If I had a test machine I would try it but I don't and its a pretty old thread so I'm not sure if it will work with Hardy 8.04.

    http://ubuntuforums.org/showthread.php?t=47999

  5. #625
    Join Date
    Nov 2005
    Beans
    13

    Re: Howto: Backup and restore your system!

    Thanks for this little piece of information!

    I just did some restoring on live system, and I think it's not necessary/wise to copy PID files from /var/run when performing restore to live system... Nothing disasterous, but nasty shutdown error list, though

  6. #626
    Join Date
    May 2008
    Location
    Indiana
    Beans
    64
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Howto: Backup and restore your system!

    This is the command I use for creating a recovery partition

    tar -c --exclude='/media/*' --exclude='/dev/*' --exclude='/home/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*' --exclude='/var/run/*' --exclude='/var/lock/*' --exclude='/lib/modules/*/volatile/*' / | tar -xv --atime-preserve -C /media/sda10

    /media/sda10 is another partition, which has a valid mounted filesystem. Best part is you can modify your lilo.conf or menu.lst and boot into it! I make these after virgin installs to preserve the base system in case I hose the configuration at some point...

    If you wanted to just create a backup file then this will work:

    tar -vcf backup.tar --exclude='/backup.tar' --exclude='/media/*' --exclude='/dev/*' --exclude='/home/*' --exclude='/proc/*' --exclude='/sys/*' --exclude='/tmp/*' --exclude='/var/run/*' --exclude='/var/lock/*' --exclude='/lib/modules/*/volatile/*' /

    It's important that the exclude's be in single quotes, where there is a *. without the quotes, the * isn't treated as a literal *, instead it will be expanded to a list of filenames.

  7. #627
    Join Date
    Jun 2008
    Beans
    2
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Howto: Backup and restore your system!

    I've been tearing my hair out trying to use crontab for my backups. Removing the verbose switch fixed it!

    Thanks

  8. #628
    Join Date
    Feb 2005
    Beans
    27

    Re: Howto: Backup and restore your system!

    Quote Originally Posted by sal View Post
    how would one go about making this into a cron job to happen at certan times? could it be made into a script some how?
    thanks.
    I've not finished reading this thread, but we may be forgetting the old trusty filesystem backup option in webmin.
    Years ago, I needed to move the current servers to servers with scsi drives. After much reading and thought, I used webmin filesystem backup to get only these directorys, as home is/can be needed or not when you may be restoring to another machine.. It'd be good to clean out the apt cache before your backups.. (Of course, webmin gives you that option to..)

    /etc
    /var
    /usr
    /root
    /sbin

    Then installed debian on the new servers, installed webmin and restored. This worked like a charm and the servers still run today..
    The beauty is, webmin does the ssh connection and scheduling for you. All with a gui you can get to from anywhere.. Nice tool!

    I'm about to try it with Hardy. We'll see..

  9. #629
    Join Date
    Jan 2008
    Location
    Davison, Michigan, U.S.A.
    Beans
    1,001

    Re: Howto: Backup and restore your system!

    Maybe I nissed this but how do I restore just 1 particular file or directory? Say I only want to restore /home/blah/blahblah. How do I modify my command line?

  10. #630
    Join Date
    Jan 2008
    Location
    Davison, Michigan, U.S.A.
    Beans
    1,001

    Re: Howto: Backup and restore your system!

    Maybe I nissed this but how do I restore just 1 particular file or directory? Say I only want to restore /home/blah/blahblah. How do I modify my command line?

Page 63 of 138 FirstFirst ... 1353616263646573113 ... LastLast

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
  •