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 to save a filesystem when ACLs and extended attributes
112              are 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              Valid 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       -s mbsize, --split=mbsize
142              Split the archive into several files of mbsize megabytes each.
143
144       -j count, --jobs=count
145              Create more than one (de)compression thread.  Useful  on  multi-
146              core  CPUs. By default fsarchiver will only use one (de)compres‐
147              sion thread (-j 1) and then only one logical processor  will  be
148              used  for  the  task.  You  should use this option if you have a
149              multi-core CPU or more than one physical CPU on  your  computer.
150              The  typical  way  to use it is to specify the number of logical
151              processors available so that all the processing power is used to
152              (de)compress  the archive very quickly. You may also want to use
153              all logical processors but one so that your system stays respon‐
154              sive for other applications.
155
156       -c password, --cryptpass=password
157              Encrypt/decrypt  data in archive. Password length: 6 to 64 char‐
158              acters. You can either provide a real password or a dash (-c -).
159              Use  the  dash if you do not want to provide the password in the
160              command line. It will be prompted in the terminal instead.
161
162

EXAMPLES

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

WARNING

224       fsarchiver is considered stable for Linux filesystems such as EXT4  and
225       XFS but unstable for NTFS.
226
227

AUTHOR

229       fsarchiver  was  written  by  Francois Dupoux. It is released under the
230       GPL2 (GNU General Public License version 2). This manpage  was  written
231       by Ilya Barygin and Francois Dupoux.
232
233
234
235                               30 December 2009                  FSARCHIVER(8)
Impressum