1FSARCHIVER(8)               System Manager's Manual              FSARCHIVER(8)
2
3
4

NAME

6       fsarchiver - filesystem archiver
7
8

DESCRIPTION

10       fsarchiver  is  a system tool that allows you to save the contents of a
11       filesystem to a compressed archive file. The filesystem contents can be
12       restored  on a device which has a different size and it can be restored
13       on a different filesystem. Unlike tar/dar, fsarchiver also creates  the
14       filesystem  when  it extracts the data to devices. Everything is check‐
15       summed in the archive in order to protect the data. If the  archive  is
16       corrupt, you just lose the current file, not the whole archive.
17
18
20   Official project homepage:
21       http://www.fsarchiver.org
22
23   Quick Start guide:
24       http://www.fsarchiver.org/quickstart/
25
26   Forums where to ask questions:
27       http://www.fsarchiver.org/forums/
28
29   Git repository:
30       https://github.com/fdupoux/fsarchiver
31
32   Report a bug:
33       https://github.com/fdupoux/fsarchiver/issues
34
35

SYNOPSIS

37       fsarchiver [ options ] savefs archive device ...
38
39       fsarchiver        [        options        ]        restfs       archive
40       id=n,dest=device[,mkfs=fstype,mkf‐
41       sopt=options,label=newlabel,uuid=newuuid] ...
42
43       fsarchiver [ options ] savedir archive directory ...
44
45       fsarchiver [ options ] restdir archive destination
46
47       fsarchiver [ options ] archinfo archive
48
49       fsarchiver [ options ] probe [detailed]
50
51

COMMANDS

53       savefs Save device filesystem to archive.
54
55       restfs Restore  filesystems from archive.  This overwrites the existing
56              data on device.  Zero-based index n indicates the  part  of  the
57              archive  to  restore.  Optionally, a filesystem may be converted
58              to fstype and extra mkfs options specified.  newlabel and  newu‐
59              uid override values stored in the archive.
60
61
62       savedir
63              Save directories to archive (similar to a compressed tarball).
64
65       restdir
66              Restore  data from archive which is not based on a filesystem to
67              destination.
68
69       archinfo
70              Show information about an existing archive  file  and  its  con‐
71              tents.
72
73       probe  Show list of filesystems detected on the disks.
74
75

OPTIONS

77       -h, --help
78              Show help and information about how to use fsarchiver with exam‐
79              ples.
80
81       -V, --version
82              Show program version and exit.
83
84       -v, --verbose
85              Verbose mode (can be used several times to increase the level of
86              details).  The details will be printed to the console.
87
88       -o, --overwrite
89              Overwrite the archive if it already exists instead of failing.
90
91       -d, --debug
92              Debug  mode  (can be used several times to increase the level of
93              details).     The     details     will     be     written     in
94              /var/log/fsarchiver.log.
95
96       -x, --experimental
97              Allow to save filesystems which support is considered experimen‐
98              tal in fsarchiver.
99
100       -A, --allow-rw-mounted
101              Allow to save a filesystem which is mounted in read-write  (live
102              backup). By default fsarchiver fails with an error if the device
103              is mounted in read-write mode which allows modifications  to  be
104              done  on  the  filesystem  during  the backup. Modifications can
105              drive to inconsistencies in the backup. Using LVM  snapshots  is
106              the  recommended  way to make backups since it will provide con‐
107              sistency, but it is only available for filesystems which are  on
108              LVM logical volumes.
109
110       -a, --allow-no-acl-xattr
111              Allow to save a filesystem when ACLs and extended attributes are
112              not supported (or  are  disabled)  by  the  kernel.  By  default
113              fsarchiver  fails  with  an  error  if it cannot access ACLs and
114              extended attributes, since they would not be saved.  If  you  do
115              not  need ACLs and extended attributes preserved then it is safe
116              to use this option.
117
118       -e pattern, --exclude=pattern
119              Exclude files and directories that match specified pattern.  The
120              pattern  can  contain  shell wildcards such as * and ? or may be
121              either a simple file/dir name or an absolute file/dir path.  You
122              must  use quotes around the pattern each time you use wildcards,
123              else it would be interpreted by the shell. The wildcards must be
124              interpreted  by  fsarchiver. See examples below for more details
125              about this option.
126
127       -L label, --label=label
128              Set the label of the archive: it is just  a  comment  about  its
129              contents.  It  can  be used to remember a particular thing about
130              the archive or the state of the filesystem for instance.
131
132       -z level, --compress=level
133              Legacy compression levels are between 0 (very fast) and 9  (very
134              good). The memory requirement increases a lot with the best com‐
135              pression levels, and it is multiplied by the number of  compres‐
136              sion  threads  (option  -j). Level 9 is considered as an extreme
137              compression level and requires an huge amount of memory to  run.
138              For      more     details     please     read     this     page:
139              http://www.fsarchiver.org/compression/
140
141       -Z level, --zstd=level
142              Zstd compression levels are between 1 (very fast) and  22  (very
143              good). The memory requirement increases a lot with the best com‐
144              pression levels, and it is multiplied by the number of  compres‐
145              sion  threads  (option  -j).  Levels  above 20 are considered as
146              extreme compression levels and requires an huge amount of memory
147              to    run.   For   more   details   please   read   this   page:
148              http://www.fsarchiver.org/compression/
149
150       -s mbsize, --split=mbsize
151              Split the archive into several files of mbsize megabytes each.
152
153       -j count, --jobs=count
154              Create more than one (de)compression thread.  Useful  on  multi-
155              core  CPUs. By default fsarchiver will only use one (de)compres‐
156              sion thread (-j 1) and then only one logical processor  will  be
157              used  for  the  task.  You  should use this option if you have a
158              multi-core CPU or more than one physical CPU on  your  computer.
159              The  typical  way  to use it is to specify the number of logical
160              processors available so that all the processing power is used to
161              (de)compress  the archive very quickly. You may also want to use
162              all logical processors but one so that your system stays respon‐
163              sive for other applications.
164
165       -c password, --cryptpass=password
166              Encrypt/decrypt  data in archive. Password length: 6 to 64 char‐
167              acters. You can either provide a real password or a dash (-c -).
168              Use  the  dash if you do not want to provide the password in the
169              command line. It will be prompted in the terminal instead.
170
171

EXAMPLES

173   save only one filesystem (/dev/sda1) to an archive:
174       fsarchiver savefs /data/myarchive1.fsa /dev/sda1
175
176   save two filesystems (/dev/sda1 and /dev/sdb1) to an archive:
177       fsarchiver savefs /data/myarchive2.fsa /dev/sda1 /dev/sdb1
178
179   restore the first filesystem from an archive (first = number 0):
180       fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1
181
182   restore the second filesystem from an archive (second = number 1):
183       fsarchiver restfs /data/myarchive2.fsa id=1,dest=/dev/sdb1
184
185   restore two filesystems from an archive (number 0 and 1):
186       fsarchiver       restfs       /data/arch2.fsa       id=0,dest=/dev/sda1
187       id=1,dest=/dev/sdb1
188
189   restore a filesystem from an archive and convert it to reiserfs:
190       fsarchiver  restfs  /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reis‐
191       erfs
192
193   restore a filesystem from an archive and specify extra mkfs options:
194       fsarchiver                 restfs                  /data/myarchive1.fsa
195       id=0,dest=/dev/sda1,mkfs=ext4,mkfsopt="-I 256"
196
197   restore a filesystem from an archive and specify a new filesystem label:
198       fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,label=root
199
200   restore a filesystem from an archive and specify a new filesystem UUID:
201       fsarchiver                  restfs                 /data/myarchive1.fsa
202       id=0,dest=/dev/sda1,uuid=5f6e5f4f-dc2a-4dbd-a6ea-9ca997cde75e
203
204   save the contents of /usr/src/linux to an archive (similar to tar):
205       fsarchiver savedir /data/linux-sources.fsa /usr/src/linux
206
207   save a filesystem (/dev/sda1) to an archive split into volumes of 680MB:
208       fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1
209
210   save a filesystem and exclude all files/dirs called 'pagefile.*':
211       fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*'
212
213   generic exclude for 'share' such as '/usr/share' and '/usr/local/share':
214       fsarchiver savefs /data/myarchive.fsa --exclude=share
215
216   absolute exclude valid for '/usr/share' but not for '/usr/local/share':
217       fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share
218
219   save a filesystem (/dev/sda1) to an encrypted archive:
220       fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1
221
222   same as before but prompt for password in the terminal:
223       fsarchiver savefs -c - /data/myarchive1.fsa /dev/sda1
224
225   extract an archive made of simple files to /tmp/extract:
226       fsarchiver restdir /data/linux-sources.fsa /tmp/extract
227
228   show information about an archive and its filesystems:
229       fsarchiver archinfo /data/myarchive2.fsa
230
231

WARNING

233       fsarchiver is considered stable for Linux filesystems such as EXT4  and
234       XFS but unstable for NTFS.
235
236

AUTHOR

238       fsarchiver  was  written  by  Francois Dupoux. It is released under the
239       GPL2 (GNU General Public License version 2). This manpage  was  written
240       by Ilya Barygin and Francois Dupoux.
241
242
243
244                               30 December 2009                  FSARCHIVER(8)
Impressum