Page 50 of 138 FirstFirst ... 40484950515260100 ... LastLast
Results 491 to 500 of 1375

Thread: Howto: Backup and restore your system!

  1. #491
    Join Date
    Aug 2007
    Beans
    13

    Re: Howto: Backup and restore your system!

    I'm trying to testing worst case recovery.

    Here is the scenario:
    - I have a backup.tar from last night
    - My HD is bad and needs to be replace
    - I replace my HD with a good one.

    My question is how do I recover from this?

    Do I need to load a fresh Ubuntu install on the new HD and then tar back?

    Or can I use a Live CD? If yes How?

  2. #492
    Join Date
    Dec 2007
    Beans
    4

    Re: Howto: Backup and restore your system!

    i backed up my Ubuntu partition with this method and later restored it and everything worked except for one thing:

    any file that I had on my system before i restored but after i backed up was still there after i backed up. this then created some problems with installing packages.

    what folders can i safely remove and still be able to tar to restore my partition?

    for a temporary solution, i just removed my /etc and restored again. i would have removed more but i was afraid that i would remove something that's required for me to tar. is there such a file (i'm a new linux user)? or is it stored in my ram or outside the Ubuntu partition? can someone post a line that explains the use of the folders in the root directory?

  3. #493
    Join Date
    Mar 2007
    Beans
    Hidden!

    Re: Howto: Backup and restore your system!

    I suggest creating a backup or restoring by booting-up with the Live CD...


    BACKUP

    Boot up with the Live CD. Then open a terminal and type the following...

    Code:
    $ sudo mkdir /mnt/backup
    $ sudo mkdir /mnt/installation
    $ sudo mount -tvfat /dev/sda4 /mnt/backup
    $ sudo mount -text3 /dev/sda6 /mnt/installation
    $ cd /mnt/installation
    $ sudo tar -cvpzf /mnt/backup/Backup-Kubuntu-2008-01-26.tgz .
    RESTORE

    Boot up with the Live CD. Then open a terminal and type the following...

    Code:
    $ sudo mkdir /mnt/backup
    $ sudo mkdir /mnt/installation
    $ sudo mount -tvfat /dev/sda4 /mnt/backup
    $ sudo mount -text3 /dev/sda6 /mnt/installation
    $ sudo rm -r /mnt/installation/*
    $ cd /mnt/installation
    $ sudo tar -xvpzf /mnt/backup/Backup-Kubuntu-2008-01-26.tgz .
    Notes
    • Replace sda4 with the partition or disk where you will keep your backups.
    • Replace sda6 with the partition where you've installed Kubuntu or Ubuntu.
    • If the partition or disk where you keep your backups is a Windows FAT file system, use mount -tvfat, as shown above.
    • If the partition or disk where you keep your backups is a Linux ext3 file system, be sure to use mount -text3 instead of mount -tvfat.
    • Replace Backup-Kubuntu-2008-01-26.tgz with the name of your backup archive.
    • Don't miss the "space" + "dot" at the end of the tar commands above.


    There are a few benefits to this approach:
    1. You don't have to unmount any file systems before you tar your Kubuntu or Ubuntu installation.
    2. Mounted file systems are not archived, making your backup archive smaller.
    3. You don't have to exclude any directories, especially if you've just setup your system exactly the way you want it.
    4. The contents of directories that do not need to be archived are automatically empty (/sys, /proc).
    5. The /media directory has the correct mount points and permissions after a restore.
    6. The tar command becomes shorter and simpler.
    7. During the restore process, you can completely wipe out your old installation, so you don't have to worry about unwanted files hanging around.
    8. No tar errors.

  4. #494
    Join Date
    May 2007
    Location
    lluis.s@gmail.com
    Beans
    65

    Re: Howto: Backup and restore your system!

    I suppose that somewhere, hidden in this post, there is a way to make the backup file go somewhere other than your filesystem folder, which is a bad partition to run out of space on.

    How about you stick it on the original post?

  5. #495
    Join Date
    Jan 2008
    Beans
    87
    Distro
    Ubuntu 12.04 Precise Pangolin

    Talking Re: Howto: Backup and restore your system!

    Easy backup? I installed the program Simple Backup Config with its counterpart Simple Backup Restore from the repository and allowed it to do it's automatic configuration, which selects the critical folders to back up, doing one full backup a week and daily incremental backups.

    But I like having a backup on an external drive, and it took a little while to figure out how to do it. Instead of selecting the fully automatic version at the top in the General tab, select the Custom (not Manual) radio button. If you connect an external hard drive to a USB port (formatted to EXT3), when you try to choose an external destination, you cannot move up out of the file system folder to get to the external device. But WITHIN the file structure is a folder called Media. You will find a link in this folder to the external drive you just plugged in. Send the backup there.

    When you are done, reset the program to automatic and it will continue to do incremental backups to your local drive.

    But if you ever destroy your system by doing something dumb, you can reinstall your basic system from the distro disk, and get everything else back by restoring the full backup on your external drive.

    You can also save incremental backups to the external drive. After placing the first (full) backup on the external drive, the next 6 backups you send there will automatically be the smaller incremental backup.

    I have used this strategy with great sucess in Windows, and have been able to get my complete system back by reloading a basic Windows install then the external backup. I have not tried a similar restore in Linux yet, but I don't see any reason why it would not work.

  6. #496
    Join Date
    Jun 2007
    Location
    delhi
    Beans
    116
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto: Backup and restore your system!

    Quote Originally Posted by hoboken View Post
    I suppose that somewhere, hidden in this post, there is a way to make the backup file go somewhere other than your filesystem folder, which is a bad partition to run out of space on.

    How about you stick it on the original post?

    its not exactly 'hidden', its actually in the the 1st post itself...



    Quote Originally Posted by Heliode View Post

    1: Backing-up

    "What should I use to backup my system then?" might you ask. Easy; the same thing you use to backup/compress everything else; TAR. Unlike Windows, Linux doesn't restrict root access to anything, so you can just throw every single file on a partition in a TAR file!

    To do this, become root with
    Code:
    sudo su
    and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)
    Code:
    cd /
    Now, below is the full command I would use to make a backup of my system:

    Code:
    tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

  7. #497
    Join Date
    Sep 2007
    Location
    New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Howto: Backup and restore your system!

    Hey there i tried this:

    tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/media --exclude=/sys /

    i excluded media because i have a second IDE HD which just has music on it, and dont wish to back that up

    i have plenty enough space however to back up the OS and settings on the primary IDE, but i get this error some way through:

    tar: Error exit delayed from previous errors

    im running the backup command as root btw(previous command i used is sudo su)

    any help much appreciated

    fyi, im backing up about 5.1gigs of stuff (the OS, Kubuntu7.10 and some installed app's/settings) on a 30gig HD, hope this helps, thanks

  8. #498
    Join Date
    Jan 2008
    Beans
    Hidden!

    Re: Howto: Backup and restore your system!

    Such a simply good way to backup. I tried the command line first, but 'Cowardly' refused to make an empty archive.
    Here's my solution:
    Since I use Ubuntu 7.10, I decided to use the file browser, pointed to the root, highlighted everything, right-clicked for 'create archive,' and saved to my /home/../Documents folder.
    I had just made a clean Ubuntu install and completed customization recently, so only 5GB of 40GB has been used. A compressed archive should easily fit.
    I realize using the GUI file browser is 'non-linuxy,' but I just wanted to get this backup done quickly.

  9. #499
    Join Date
    Jan 2008
    Beans
    1

    Exclamation Re: Howto: Backup and restore your system!

    I'm Running PcLinuxOs 2.21.2 and if someone could explain this to me alittle more i'm kinda a little lost and could use the help.... I moved my backup file to my other computer and it worked just fine but i dont know how to re-create the files listed below ans i have no idea what files i have to re-create . If someone could help me out that would be great!!

    Thankx!! Hope to hear from someone real soon..


    re-create the directories you excluded:
    Code:

    mkdir proc
    mkdir lost+found
    mkdir mnt
    mkdir sys
    etc...

    And when you reboot, everything should be the way it was when you made the backup!

  10. #500

    Re: Howto: Backup and restore your system!

    Hi there, nice howto. I really like the use of standard tools like tar, because in the event of trouble you will always have access to them.

    Since you're basically using tar to image the whole system here, there would be another simple option though: dump. I've chosen dump because of the following bit I found in the FreeBSD handbook (which I suppose applies to Ubuntu to some extent, too):
    18.12.7 Which Backup Program Is Best?
    dump(8) Period. Elizabeth D. Zwicky torture tested all the backup programs discussed here. The clear choice for preserving all your data and all the peculiarities of UNIX file systems is dump.
    The command would be something like
    Code:
    dump -0uf /media/usbdisk/{insert/filename} /
    which is what I use with a USB drive mounted on /media/usbdisk as the target - but I'd have to double check what happens if you have multiple mount points, so don't use this just now! ... I think with the above command dump would only copy the file system mounted on /, and would not recurse into file systems mounted on top of that. So if you have /home on a separate partition, that requires a second dump command.

    I also haven't quite figured out what happens with /dev when you back up like this (or with tar which gives problems too I think?). I believe udev puts lots of stuff under /dev which you can circumvent by reading /dev/.static instead, but I haven't finished reading into it.
    Last edited by Patsoe; January 31st, 2008 at 07:15 PM. Reason: explaining what the command does

Page 50 of 138 FirstFirst ... 40484950515260100 ... 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
  •