Page 24 of 138 FirstFirst ... 1422232425263474124 ... LastLast
Results 231 to 240 of 1375

Thread: Howto: Backup and restore your system!

  1. #231
    Join Date
    Oct 2006
    Beans
    3

    Question Re: Howto: Backup and restore your system!

    My strategy is to use partimage to backup the whole system and then either rsync or tar to backup that which changes more often ie home directories.

    In the user directories, there are a couple which I don't think need to be backed up

    .beagle and .Trash

    Given they are hidden, how do I properly format the --exclude clauses for either/or both tar & rsync?

    I tried the ones I knew, tick, back-tick, double quote, wack with no success.


    Currently on a newer install my home dir is at 600 MB, of which 300 is in .beagle.

    TIA
    UPDATE:

    So, I got thru reading the many other pages on this topic and will draw your attention to posts #135, #150, #161 and #162. My error was not the incorrect format of the command line parse for the dot files, but rather that tar had changed.

    Bad developer - no donut.

    Someone asked a 'noob' question and I didn't see a reply. It was how to include the hidden or dot directories. Ans: they are included.

    So while I am in the dir I want to save my backups to, /mnt/backup I ran this successfully
    % tar cvpjf backup.tar.bz2 --exclude=.Trash --exclude=News --exclude=.beagle /home/me

    .Trash is excluded cause I threw it away once already
    .beagle - easily recreated and huge, relatively speaking
    News - for Pan, and I regard usenet posts as transitory anyway.


    Any other directories in /home that you might choose to not backup?


    now I gotta scan back for those posts on samba 2 gig limitation ... ...
    Last edited by ric_spam; October 27th, 2006 at 09:26 PM. Reason: Found some answers in the forums

  2. #232
    Join Date
    Aug 2006
    Location
    tuesday
    Beans
    6,502
    Distro
    Kubuntu Development Release

    Re: Howto: Backup and restore your system!

    Thanks to this post I archived my system only hours before destroying it with the multicrash feature of the edgy upgrade process.

    Just saying my thanks.

  3. #233
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Howto: Backup and restore your system!

    I have a few questions about this. I use rsync to back up my /documents partition, but I want to use the method outlined in this thread for backing up my / partition.

    I'm worried it will actually overwrite my /documents partition, though. Would something like this work? Also, any reason to
    Code:
    sudo su
    first instead of just using one sudo command?

    I would be using this for backup:
    Code:
    #!/bin/bash
    sudo umount /documents
    sudo su
    cd /
    tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
    mount -a
    exit
    and then this to restore:
    Code:
    #!/bin/bash
    sudo umount /documents
    sudo su
    cd /
    tar xvpfz backup.tgz -C /
    mkdir proc
    mkdir lost+found
    mkdir mnt
    mkdir sys
    mount -a
    exit
    I'm particularly worried about this since I have some items symlinked from /documents to my /home/username folder on the / partition. Would it bork my system to have symlinks from a partition that isn't mounted yet, even if the partition is going to be remounted later?

    And there's no way Ubuntu could overwrite my /documents partition if the partition is unmounted, right?

  4. #234
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Backup and restore your system!

    i can't get this sucker to exclude my media folder (where i have my server mounted) ... it keeps including all the junk from my server in my backup.

    i have tried:

    Code:
    tar cvpzf /media/server/shared/backup/backup.tgz / --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/media --exclude=/sys
    and
    Code:
    tar cvpzf /media/server/backup.tgz / --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/media/server --exclude=/sys
    but still all the shared files are getting included in the tar. as you can see, i'm attempting to save the backup to my server (/media/server) so i can restore it from there when i get a new hard drive (current drive is showing signs of failing).

    any way i seem to run this thing, i still get this:
    Code:
    /etc/idmapd.conf
    /media/
    /media/cdrom
    /media/cdrom0/
    /media/floppy
    /media/floppy0/
    /media/server/
    which then proceeds to inculde everything on my server in the backup
    Last edited by dmizer; November 7th, 2006 at 03:38 AM.

  5. #235
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Howto: Backup and restore your system!

    I read in some other thread that if you put / last that it will work--not sure what the difference is, though.

    So it'd be something like this:
    Code:
    sudo su
    cd /media/server/shared/backup/
    tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/media --exclude=/sys /

  6. #236
    Join Date
    Sep 2006
    Beans
    3

    --exclude still includes

    whats going on, i see all the files i wanted to exclude being included in the archive? whats going on. i am copying and pasting your commands??

    i am struggling here

  7. #237
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Backup and restore your system!

    Quote Originally Posted by aysiu View Post
    I read in some other thread that if you put / last that it will work--not sure what the difference is, though.

    So it'd be something like this:
    Code:
    sudo su
    cd /media/server/shared/backup/
    tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/media --exclude=/sys /
    that did the trick ... thanks.

  8. #238
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Howto: Backup and restore your system!

    just restored my system. here's what i did:
    backed up the entire system to my server. purchased a 60 gig hard drive to replace my ancient 6 gig hard drive that was beginning to show signs of wear.

    installed the alternate server dapper on the new drive (backuped system was dapper) > copied backup file to the new hard disk > unziped as root > reboot = completely restored system in less than an hour's work (not including the walk to the parts store to purchase the new drive).

    i didn't have to recreate any directories after the backup was done, and because i installed the server from scratch, i didn't have to restore grub.

    only problem i've run into so far is that i had some kind of strange permissions problem related to the linux restricted modules package. i just reinstalled it and no more problem with that. man this new drive is fast! and it's very comforting not to hear loud clunking every 5 minutes or so.
    Last edited by dmizer; November 7th, 2006 at 05:34 PM.

  9. #239
    Join Date
    Jun 2005
    Location
    South Carolina, USA
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    First post of this "How TO" needs EDITED!

    As mentioned before, I had to read quite a bit of this thread to find out that there is a typo on the first post that causes a lot of confusion (to me anyways)...

    the code is shown as...

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

    when the "/" should be at the end of the command as follows:

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

    I feel this should be edited. (I'm not the first to mention this).

    Thanks
    Last edited by jromer; November 26th, 2006 at 09:14 PM.

  10. #240
    Join Date
    Apr 2006
    Beans
    96

    Re: Howto: Backup and restore your system!

    here! here! to jromer's post.

    i have been witness to *numerous* posts all indicating the same "slash at the end" solution. while it has been documented throughout this particular thread, i can sympathize with the posters in not wanting to read through all 24 pages. please save us the agony and edit the original post.

Page 24 of 138 FirstFirst ... 1422232425263474124 ... 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
  •