Peppermint | Linux OS Community Forum
 
It is currently Wed Jul 18, 2018 6:23 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Reversing Time with FSArchiver
PostPosted: Sat Jan 08, 2011 11:48 pm 
Offline
User avatar

Joined: Tue Aug 03, 2010 11:34 am
Posts: 161
Location: Venezuela
Class: backup/restore/clone file-system
Difficulty: minimal command line skills (need to read carefully)
Time: about 10 minutes to setup; 1/2 to X hours to backup/restore
Desirability: backup/restore/clone Linux or Windows file system

About
FSArchiver is a flexible standalone program for Linux to backup/restore Linux and Windows partitions, can modify the file system while restoring. It is a component on the SysRescueCD which contains a plethora of recovery tools for Linux grub-legacy, grub-pc, Windows and more.

Other tools
Other tools exist for cloning/backing up systems in FOSS. Some examples are Partimage and Clonezilla. These tools work at the filesystem blocks level, so it's not possible to restore the backup to a smaller partition, only to one equal or larger.

Flexible
FSArchiver can extract an archive to a partition which is smaller that the original one as long as there is enough space to store the data. It can also restore the data to a different file-system by converting file-system while restoring, for example: you can backup an ext3 file-system, and restore it as a reiserfs; or backup a grub2 system with ext4, then restore it onto a system with grub1 as ext3.

Secure
FSArchiver preserves everything; filesystem attributes (filesystem features, label, uuid), all file attributes (contents, timestamps, owner, permissions, extended attributes, acl, ...), by default. The down side is you may have an error about the mount options when the extended-attributes or the ACLs are not visible. You may have to readjust attributes after restoration.

Clone
FSArchiver can be used to clone NTFS partitions, where Windows is installed or where Windows data are saved. Make a backup of your Windows installation, or clone it to another computer. (Sometimes there are activation issues). Run update-grub after rebooting.

Some Examples

How to archive a single filesystems:
to archive a partition of your disk, consider that your linux system is installed on /dev/sda1 and you want to back it up to a file on /mnt/backup. You can run this command from a livecd:
fsarchiver savefs -o -v /mnt/backup/pmint-root.fsa /dev/sda1

fsarchiver may balk and say that you need to remount read-only. Don't waste time, just unmount and try again.

-o = overwrite the archive name if there was an error
-v = verbose, otherwise it goes Unix and does nothing till finished


How to archive a multiple filesystems into a single archive file:
fsarchiver savefs -o -v /mnt/backup/pmint-all.fsa /dev/sda1 /dev/sda2


How to restore one filesystem:
fsarchiver restfs -v /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1

to restore the second filesystem from an archive (second = number 1):
fsarchiver restfs -v /mnt/backup/archive-multple-filesystems.fsa id=1,dest=/dev/sdb1

Convert filesystem:
What if you need to to convert the filesystem to an older version. For instance, the original filesystem was ext2 when saved but you want reiserfs on the new partition; then convert it from ext2 to reiserfs while restoring as follows:
fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1,mkfs=reiserfs

Split an archive into several volumes with fsarchiver:
if the size of your backup is 8GB and you want to save it on DVD discs, split the archive into volumes of 4.3GB (or 3500 MB for USB pendrives):
fsarchiver savefs -s 4300 /data/backup-rhel-5.2-fsa033.fsa /dev/sda1

The first volume will have an .fsa extension, the next volumes will terminate with .f01, .f02, .f03, .... At restore, you just specify the path to the first volume on the command line, and it will automatically use the next volumes if they are in the same directory. Else it will display a prompt, where you can specify another location for a volume.


An example of filesystem detection:
# fsarchiver probe simple
[=====DEVICE=====] [==FILESYS==] [=====LABEL=====] [====SIZE====] [MAJ] [MIN]
[/dev/sda1 ] [ext3 ] [boot ] [ 768.72 MB] [ 8] [ 1]
[/dev/sda2 ] [reiserfs ] [gentoo ] [ 12.00 GB] [ 8] [ 2]
[/dev/sda3 ] [ext3 ] [data ] [ 350.00 GB] [ 8] [ 3]
[/dev/sda4 ] [ext3 ] [backup ] [ 300.00 GB] [ 8] [ 4]
[/dev/sda5 ] [lvm2pv ] [ ] [ 134.38 GB] [ 8] [ 5]
[/dev/sda6 ] [lvm2pv ] [ ] [ 106.24 GB] [ 8] [ 6]
[/dev/sdb1 ] [reiserfs ] [usb8gb ] [ 7.46 GB] [ 8] [ 17]


For much more information, see the following:
Fsarchiver Quickstart at http://www.fsarchiver.org/QuickStart
Fsarchiver main site: http://www.fsarchiver.org/Main_Page
System Rescue CD: http://www.sysresccd.org/Main_Page

_________________
Peppermint, Manjaro, Refracta


Top
 Profile  
 
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL