Page 39 of 138 FirstFirst ... 2937383940414989 ... LastLast
Results 381 to 390 of 1375

Thread: Howto: Backup and restore your system!

  1. #381
    Join Date
    Mar 2007
    Location
    UK
    Beans
    70
    Distro
    Ubuntu Development Release

    Re: Howto: Backup and restore your system!

    This command is working great for me, I have chucked it into a shell script and all is well - I thought I'd automate the whole process a little more and execute the script with cron.

    This is where I'm having issues - When manually executing the script the archive is created perfectly at about 9GB, though when cron executes the script I'm left with a file that is about 8MB and only contains a very small portion of my data. Cron is scheduled to execute at 20:05, at this time, no users are logged in and the machine is left on the login screen.

    Any ideas of what could be the reason for this failure?

    My script looks like:
    Code:
    #!/bin/bash
    tar cvpzf /media/backup/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/media --exclude=/mnt --exclude=/sys /
    My crontab (root):
    Code:
    5 20 * * * /home/kris/backup.sh

  2. #382
    Join Date
    Oct 2005
    Location
    Peru, South America
    Beans
    1,486
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Howto: Backup and restore your system!

    Quote Originally Posted by KrisWillis View Post
    This command is working great for me, I have chucked it into a shell script and all is well - I thought I'd automate the whole process a little more and execute the script with cron.

    This is where I'm having issues - When manually executing the script the archive is created perfectly at about 9GB, though when cron executes the script I'm left with a file that is about 8MB and only contains a very small portion of my data. Cron is scheduled to execute at 20:05, at this time, no users are logged in and the machine is left on the login screen.

    Any ideas of what could be the reason for this failure?

    My script looks like:
    Code:
    #!/bin/bash
    tar cvpzf /media/backup/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/media --exclude=/mnt --exclude=/sys /
    My crontab (root):
    Code:
    5 20 * * * /home/kris/backup.sh
    Your script looks fine, except I think you need to change tar to /bin/tar to show the exact location of the tar command. run this:
    Code:
    which tar
    to find where your tar is located, it should be the same though. That should work, that is what I have used for a long time in a very similar script.
    On a second note it really doesn't matter if someone is logged in or not, the script will still run since it is root, however it may slow the computer down a little.

    Shane

  3. #383
    Join Date
    Mar 2007
    Location
    UK
    Beans
    70
    Distro
    Ubuntu Development Release

    Re: Howto: Backup and restore your system!

    Thanks Shane, I'll give that a go...

  4. #384
    Join Date
    Mar 2007
    Location
    UK
    Beans
    70
    Distro
    Ubuntu Development Release

    Re: Howto: Backup and restore your system!

    Ok, that didn't fix my problem - But I have figured out what did, I turned off the verbose switch and my file appears to be generating properly now. Thanks guys.

  5. #385
    Join Date
    Aug 2007
    Beans
    58

    Re: can't reboot after restore

    Followed the instructions to backup, but:

    -after untarring and creating the necessary folders i rebooted.
    -I then received the grub text (normal)
    -Was greeted with the splash and got stuck there
    -i let it sit and it eventually gets to the BusyBox v1.1.3 with error:

    /bin/sh: can't access tty; job control turned off
    (initramfs) --- (ram drive?)


    Also tried to reinstall GRUB, but still got the same response. Any thoughts?

  6. #386
    Join Date
    Oct 2005
    Location
    Peru, South America
    Beans
    1,486
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: can't reboot after restore

    Quote Originally Posted by mixersoft View Post
    Followed the instructions to backup, but:

    -after untarring and creating the necessary folders i rebooted.
    -I then received the grub text (normal)
    -Was greeted with the splash and got stuck there
    -i let it sit and it eventually gets to the BusyBox v1.1.3 with error:

    /bin/sh: can't access tty; job control turned off
    (initramfs) --- (ram drive?)


    Also tried to reinstall GRUB, but still got the same response. Any thoughts?
    Yes your problem is UUID is in your menu list and your new UUID is not the same as your restored system. You need to go in and edit your menu.lst. It is almost impossible to recover without doing this. You will need to boot into a LiveCD then run
    Code:
    sudo fdisk -l
    and look for the partition that has your Ubuntu on it. Then mount it with
    Code:
    sudo mkdir /media/Ubuntu
    and then (You will need to replace the red part with the proper partition name)
    Code:
    sudo mount /dev/hda1 /media/Ubuntu
    then
    Code:
    sudo cp /media/Ubuntu/boot/grub/menu.lst /media/Ubuntu/boot/grub/menu.lst_backup
    and then finally edit your grub like this:
    Code:
    sudo gedit /media/Ubuntu/boot/grub/menu.lst
    Now where you see
    Code:
    root=UUID=930jks0dka-d-sljhasd  - or some long number like this
    You will need to replace the red part with:
    Code:
    /dev/hda1
    You need to put the proper partition name into the green part.
    That is exactly why I don't recommend this backup method. If you have any questions feel free to post back.

    Shane

  7. #387
    Join Date
    Aug 2007
    Beans
    58

    Re: Howto: Backup and restore your system!

    worked like a charm. Many thanks!

  8. #388
    Join Date
    Jan 2007
    Location
    San Francisco, California
    Beans
    172
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Howto: Backup and restore your system!

    The length and convolutions of this thread illustrate that Ubuntu's disk and files backup tools and processes remain overly complicated for many users (there's that word again).

    First, observe that the word "backup" has no finite meaning. That's led to a lot of confusion between those who use the word to mean backing up files and those who use the word to mean backing up disks.

    As for me, after extensive research and multiple "Linux moments", I retain a Windows partition on my hard drive so that I can continue to use Norton Ghost 2003. As I mentioned in an earlier post on this thread, I've found that Ghost 2003's -ial switch enables me to image and restore my Feisty system's EXT3 boot and root partitions.

    I'll conclude by observing that for most users backing up a Linux system remains an experimental exercise. The problem with that is that Linux will quickly educate a user that experiments should only be performed after one has safely backed up up one's system, lest a failed experiment render the system unusable. And 'round and 'round we go...

    Cheers & hope this helps,
    Ric
    SFO
    Last edited by Phrawm48; September 27th, 2007 at 11:06 PM.

  9. #389
    Join Date
    Oct 2005
    Location
    Peru, South America
    Beans
    1,486
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Howto: Backup and restore your system!

    I agree, backing up is an experimental thing. Hence I keep my /home partition separate with all my data. Now the best backup solution I have ever used is partimage. And I just came across this link that seems like the most perfect solution for me. I'm going to give it a try. I have used partimage many times and really like it, however I don't like being tied to a CD for my backup - restore solutions so that link is going to be the best solution if it works!

    Shane

  10. #390
    Join Date
    May 2006
    Location
    Louisville, KY, USA
    Beans
    14
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Howto: Backup and restore your system!

    I followed this method, made an oops...

    chmod -R 777 /

    I did this as root, now I can't restore my system at all, (it is a server)
    I need to know if there is a way to restor the file system permissions before I reload the entire thing.

Page 39 of 138 FirstFirst ... 2937383940414989 ... 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
  •