Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: tar command to backup Ubuntu system ?

  1. #21
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    6,057

    Re: tar command to backup Ubuntu system ?

    Well, some things remain hard to explain. But let us look forward: How are your tests with tar running?

    Have you tried a mini-system to check, that the tarball can be restored to a 'perfect' copy of the original system?

  2. #22
    Join Date
    Dec 2009
    Beans
    157

    Re: tar command to backup Ubuntu system ?

    Quote Originally Posted by Coder88 View Post
    I have a really nice Ubuntu install tweaked, complete with all the software apps I need, Compiz effects, etc. I would like to back it up in case it succumbs to a case of fubar from either something i do or a system update/upgrade. I have used Clonezilla to do some partition cloning, but sometimes that does not work. I am getting better at learning Grub2 so I am feeling better about being able to restore Grub2 if needed, so I think a tar backup might suffice. Just that I want to be clear on a tar command to do what needs doing.

    [...]

    Another option to consider is fsarchiver, for full OS backups it's easier than tar.

    http://www.fsarchiver.org/Main_Page

    The feature that I like most is the restoration of a File System archive to a partition smaller than the original, and I used it just recently with a Ubuntu partition restore, from an old 80 GB disk to 25 GB new partition. It worked great.
    Also it supports different (nine) levels of compression, it can split the archive into smaller parts so they can be backed up say in DVD, etc ...

    http://www.fsarchiver.org/Compressio...vels_available

    fsarchiver can be run from a different OS partition or a recent Ubuntu Live CD. The two most basic commands that you might need are:

    Code:
    # The paths below are just examples.
    # Backup FS:
    
        fsarchiver savefs /data/backup/ubuntu_rootfs.fsa /dev/sda1
    
    
    # Restore FS:
    
        fsarchiver restfs /data/backup/ubuntu_rootfs.fsa id=0,dest=/dev/sda1
    More on its usage here:

    http://www.fsarchiver.org/QuickStart

  3. #23
    Join Date
    Jun 2013
    Beans
    113

    Re: tar command to backup Ubuntu system ?

    Nice, thank you. I am going to add fsarchiver to my arsenal and bag 'o linux tricks.

  4. #24
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: tar command to backup Ubuntu system ?

    Quote Originally Posted by erind View Post
    Another option to consider is fsarchiver, for full OS backups it's easier than tar.

    ...
    In the past I had a lot of issues with fsarchiver , CRC failed, and then trying to restore failed as well. It has been well over 1 1/2 years since I last tried it, so you have pique my interest, since there has been a lot of changes since then. Here are my results with both partclone and fsarchiver:
    Code:
    $ date;sudo ./fsarchiver -j2 savefs /media/user/ext4/Ubuntu.fsa /dev/sda7;date
    ...07:59:19...
    Statistics for filesystem 0
    * files successfully processed:....regfiles=110585, directories=18276, symlinks=46127, hardlinks=0, specials=84
    * files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
    ...08:03:59... 
    total => 4min41sec
    ====
    $ date;sudo ./partclone.ext4 -N -c -s /dev/sda7 -o /media/user/ext4/ubuntu;date;sudo gzip --fast /media/user/ext4/ubuntu;date
    ...10:11:55...
    Cloned successfully.
    ...10:14:01... => 2min6sec
    ...10:15:49... => 1min48sec (gzipping)
    total => 3min54sec
    This is a drastic improvement over the older version. It took over 11min to backup my ubuntu partition.
    Even though partclone is faster, fsarchiver compressed the output more, so that eats up some time.
    The newest partclone has a new curses feature on both clone and restore which gives a more polished look. It use to be only on restore.

    I'm unsure if the multi-core feature was available on the older fsarchiver that I used, but adding "-j2" for my dual-core really speed up the process.
    Last edited by VMC; September 10th, 2013 at 12:00 AM.
    boot_info_script | AMD64 Athlon X2 Dual-Core - nVidia Geforce 6150 SE - 4GB DDR3

  5. #25
    Join Date
    Dec 2009
    Beans
    157

    Re: tar command to backup Ubuntu system ?

    Quote Originally Posted by VMC View Post
    [...]

    This is a drastic improvement over the older version. It took over 11min to backup my ubuntu partition.
    Even though partclone is faster, fsarchiver compressed the output more, so that eats up some time.
    [...]
    It's been pretty efficient for me as well - a fsarchiver backup/restore of about 20GB FS took about 15-20 min, final archive size was about 11GB (all default settings). I haven't used the fsarchiver's older versions or partclone, so can't comment on that.
    In my recent backup/restore the original old disk was 80GB, total FS size was ~20GB, the final archive was 11GB, and it was restored to a new smaller partition of 25GB.
    No issues either with Ubuntu or a Windows operation, (always used on unmounted OS partitions). I've had to simply run Boot-Repair for a final boot restore and that was it.
    What really drew me into fsarchiver, was its ability to backup a FS into a smaller partition than the original one. All in all a very useful backup utility.

Page 3 of 3 FirstFirst 123

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
  •