fsarchive

Files Basic Backup
Support for basic file attributes (permissions, owner, ...)
Support for extended attributes (SELinux)
Everything is checksummed (loose the current file)
basic file-system attributes (label, uuid, block-size)
Multi-threaded lzo, gzip, bzip2, lzma compression
splitting large archives into several files
Encryption of the archive using a password
restore the filesystem to a partition which is smaller than the original
restore the data on a different file-system
It allows to preserve all the windows file attributes (ACL, standard attributes, ...).

Example

fsarchiver [<options>] <command> <archive>   <part1>  [<part2>]

savefs:

fsarchiver [-j3] savefs /mnt/backup/gentoo-rootfs.fsa    /dev/sda1
fsarchiver [-s 4300] savefs /mnt/backup/wholedisk.fsa   /dev/sda1  /dev/sda2

-j1            1 compression threads (default)
-z3           default (default)

compression:
1     lzo -3
2     gzip -3
5     bzip2 -2
7     lzma -1

bzip2 is 15% better than gzip, and lzma is 15% better than bzip2.

z9 is using  754MB for 1 thread

-s 4300     split it into 4300MB

It's also important that you make sure that SELinux is not enabled in the kernel running FSArchiver when you save a file-system which has been labeled by SELinux

restfs:
fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1
fsarchiver restfs /mnt/backup/archive-multple-filesystems.fsa   id=1,dest=/dev/sdb1
fsarchiver restfs /mnt/backup/archive-multple-filesystems.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1

archinfo
fsarchiver archinfo /backup//sysimg-20100131.fsa

====================== archive information ======================
Archive type:                   filesystems
Filesystems count:              2
...........................................................
===================== filesystem information ====================
Filesystem id in archive:       0
Filesystem format:              ext3
Filesystem label:               boot
Filesystem uuid:                d76278bf-5e65-4568-a899-9558ce61bf06
Original device:                /dev/sda1
Original filesystem size:       961.18 MB (1007869952 bytes)
Space used in filesystem:       356.86 MB (374190080 bytes)

Detection

fsarchiver probe simple

Tar:

fsarchiver savedir /data/linux-sources.fsa /usr/src/linux

restdir:

restore data from an archive which is not based on a filesystem

fsarchiver restdir /data/linux-sources.fsa /tmp/extract

exclude:

fsarchiver savefs /data/myarchive.fsa /dev/sda1 -e='pagefile.*'
fsarchiver savefs /data/myarchive.fsa -e= hare
fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share

hot backup

mount -o remount,ro /dev/xxx

-A: allow to save a filesystem which is mounted in read-write (live backup)

-c <password>: encrypt/decrypt data in archive, "-c -" for interactive password
-e <pattern>: exclude files and directories that match that pattern
-L <label>: set the label of the archive (comment about the contents)

 

 

 

 

Creative Commons license icon Creative Commons license icon