FSARCHIVER(8)

๐Ÿ“ฆ
version 0.8.9 ยท 2 versions
  • 0.8.9 ยท alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.8.6 ยท ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– FSARCHIVER(8) ๐Ÿ’–

okay bestie, pull up a chair, because we're about to talk about fsarchiver โ€” the filesystem archiver โ€” and honestly? she's that girl. this is the fsarchiver(8) page from the System Manager's Manual, and yes i'm about to make you obsessed with a backup tool. no cap.


โœจ NAME โœจ

fsarchiver โ€” filesystem archiver ๐ŸŽ€


๐ŸŒธ DESCRIPTION ๐ŸŒธ

so like, fsarchiver is a system tool that lets you save the contents of a filesystem into a compressed archive file. and the way it does it is genuinely iconic:

  • the filesystem contents can be restored onto a device that has a different size ๐Ÿ’…
  • and it can be restored onto a different filesystem ๐Ÿฆ‹
  • unlike tar/dar, fsarchiver also creates the filesystem when it extracts the data to devices. yes ma'am, she does it all โœจ

and here's the part that makes her main character: everything is checksummed in the archive to protect the data. so if your archive gets corrupt, you just lose the current file โ€” not the whole archive. the way that is such a relief fr fr ๐Ÿ˜ญ๐Ÿ’–


Official project homepage:

http://www.fsarchiver.org

Quick Start guide:

http://www.fsarchiver.org/quickstart/

Git repository:

https://github.com/fdupoux/fsarchiver

Report a bug:

https://github.com/fdupoux/fsarchiver/issues


๐ŸŒˆ SYNOPSIS ๐ŸŒˆ

fsarchiver [ options ] savefs archive device ...

fsarchiver [ options ] restfs archive
id=n,dest=device[,mkfs=fstype,mkfsopt=options,label=newlabel,uuid=newuuid]
...

fsarchiver [ options ] savedir archive directory ...

fsarchiver [ options ] restdir archive destination

fsarchiver [ options ] archinfo archive

fsarchiver [ options ] probe [detailed]

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

  • savefs โ€” save a device filesystem to an archive. ๐Ÿ’พ
  • restfs โ€” restore filesystems from an archive. ๐Ÿšจ this overwrites the existing data on device, bestie, so be careful. the zero-based index n tells her which part of the archive to restore. optionally, a filesystem may be converted to fstype and you can pass extra mkfs options. newlabel and newuuid override the values stored in the archive.
  • savedir โ€” save directories to an archive (basically like a compressed tarball, iykyk). ๐Ÿ—‚๏ธ
  • restdir โ€” restore data from an archive that is not based on a filesystem, into destination. ๐Ÿซถ
  • archinfo โ€” show information about an existing archive file and its contents. ๐Ÿ”
  • probe โ€” show the list of filesystems detected on the disks. ๐Ÿ•ต๏ธโ€โ™€๏ธ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • -h, --help โ€” show help and info about how to use fsarchiver, with examples. yes she'll teach you. ๐Ÿ’–
  • -V, --version โ€” show the program version and exit. โœจ
  • -v, --verbose โ€” verbose mode. you can stack it several times to crank up the level of detail. all the details get printed to the console. ๐Ÿ‘€
  • -o, --overwrite โ€” overwrite the archive if it already exists, instead of just failing. ๐Ÿ”ฅ
  • -d, --debug โ€” debug mode. also stackable to increase the level of detail. the details get written into /var/log/fsarchiver.log. ๐Ÿ›
  • -x, --experimental โ€” allow saving filesystems whose support is considered experimental in fsarchiver. โš ๏ธ
  • -A, --allow-rw-mounted โ€” allow saving a filesystem that's mounted in read-write mode (a live backup). by default fsarchiver fails with an error if the device is mounted read-write, because that allows modifications to happen on the filesystem during the backup. and modifications can drive to inconsistencies in the backup. ๐Ÿ˜ฌ using LVM snapshots is the recommended way to make backups since it provides consistency โ€” but that's only available for filesystems that are on LVM logical volumes. also, deleted files during the backup process are ignored when this option is used.
  • -a, --allow-no-acl-xattr โ€” allow saving a filesystem when ACLs and extended attributes are not supported (or are disabled) by the kernel. by default fsarchiver fails with an error if it can't access ACLs and extended attributes, since they would not be saved. if you don't need ACLs and extended attributes preserved, then it's safe to use this option. โœ…
  • -e pattern, --exclude=pattern โ€” exclude files and directories that match the specified pattern. the pattern can contain shell wildcards like * and ?, or it can be a simple file/dir name, or an absolute file/dir path. you must put quotes around the pattern every time you use wildcards, otherwise the shell would interpret it instead. the wildcards must be interpreted by fsarchiver. check the examples below for more details about this option. ๐ŸŽ€
  • -L label, --label=label โ€” set the label of the archive. it's just a comment about its contents. you can use it to remember a particular thing about the archive, or about the state of the filesystem for instance. ๐Ÿท๏ธ
  • -z level, --compress=level โ€” legacy compression levels go between 0 (very fast) and 9 (very good). the memory requirement increases a lot with the best compression levels, and it gets multiplied by the number of compression threads (option -j). level 9 is considered an extreme compression level and requires a huge amount of memory to run. for more details, read this page: http://www.fsarchiver.org/compression/ ๐Ÿ˜ฎโ€๐Ÿ’จ
  • -Z level, --zstd=level โ€” Zstd compression levels go between 1 (very fast) and 22 (very good). same deal: memory requirement increases a lot with the best compression levels, and it's multiplied by the number of compression threads (option -j). levels above 20 are considered extreme compression levels and require a huge amount of memory to run. more details here: http://www.fsarchiver.org/compression/ ๐Ÿ”ฅ
  • -s mbsize, --split=mbsize โ€” split the archive into several files of mbsize megabytes each. โœ‚๏ธ
  • -j count, --jobs=count โ€” create more than one (de)compression thread. useful on multi-core CPUs. by default fsarchiver only uses one (de)compression thread (-j 1), and then only one logical processor gets used for the task. you should use this option if you have a multi-core CPU or more than one physical CPU on your computer. the typical way to use it is to specify the number of logical processors available, so all the processing power is used to (de)compress the archive very quickly. you may also want to use all logical processors but one, so your system stays responsive for other applications. ๐Ÿง โšก
  • -c password, --cryptpass=password โ€” encrypt/decrypt data in the archive. password length: 6 to 64 characters. you can either provide a real password, or a dash (-c -). use the dash if you don't want to provide the password on the command line โ€” it'll be prompted in the terminal instead. ๐Ÿ”

๐Ÿฆ‹ EXAMPLES ๐Ÿฆ‹

save only one filesystem (/dev/sda1) to an archive:

fsarchiver savefs /data/myarchive1.fsa /dev/sda1

save two filesystems (/dev/sda1 and /dev/sdb1) to an archive:

fsarchiver savefs /data/myarchive2.fsa /dev/sda1 /dev/sdb1

restore the first filesystem from an archive (first = number 0):

fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1

restore the second filesystem from an archive (second = number 1):

fsarchiver restfs /data/myarchive2.fsa id=1,dest=/dev/sdb1

restore two filesystems from an archive (number 0 and 1):

fsarchiver restfs /data/arch2.fsa id=0,dest=/dev/sda1
id=1,dest=/dev/sdb1

restore a filesystem from an archive and convert it to reiserfs:

fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reiserfs

restore a filesystem from an archive and specify extra mkfs options:

fsarchiver restfs /data/myarchive1.fsa
id=0,dest=/dev/sda1,mkfs=ext4,mkfsopt="-I 256"

restore a filesystem from an archive and specify a new filesystem label:

fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,label=root

restore a filesystem from an archive and specify a new filesystem UUID:

fsarchiver restfs /data/myarchive1.fsa
id=0,dest=/dev/sda1,uuid=5f6e5f4f-dc2a-4dbd-a6ea-9ca997cde75e

save the contents of /usr/src/linux to an archive (similar to tar):

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

save a filesystem (/dev/sda1) to an archive split into volumes of 680MB:

fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1

save a filesystem and exclude all files/dirs called 'pagefile.*':

fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*'

generic exclude for 'share' such as '/usr/share' and '/usr/local/share':

fsarchiver savefs /data/myarchive.fsa --exclude=share

absolute exclude valid for '/usr/share' but not for '/usr/local/share':

fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share

save a filesystem (/dev/sda1) to an encrypted archive:

fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1

same as before but prompt for password in the terminal:

fsarchiver savefs -c - /data/myarchive1.fsa /dev/sda1

extract an archive made of simple files to /tmp/extract:

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

show information about an archive and its filesystems:

fsarchiver archinfo /data/myarchive2.fsa

โš ๏ธ WARNING โš ๏ธ

bestie. listen. fsarchiver is considered stable for Linux filesystems such as EXT4 and XFS, but unstable for NTFS. so likeโ€ฆ know what you're doing, ok? ๐Ÿ’€

๐Ÿ’œ AUTHOR ๐Ÿ’œ

fsarchiver was written by Francois Dupoux. it is released under the GPL2 (GNU General Public License version 2). this manpage was written by Ilya Barygin and Francois Dupoux. legends, honestly. ๐Ÿซถ


and that's the whole page, bestie โœจ this was the fsarchiver(8) page from the System Manager's Manual, dated 30 December 2009. go forth, back up your filesystems, and slay ๐Ÿ’…๐Ÿ’–๐ŸŽ€๐Ÿฆ‹๐ŸŒธ