1STAR(1) Schily´s USER COMMANDS STAR(1)
2
3
4
6 star - unique standard tape archiver
7
9 star command [options] [-find] file1 ... filen [find_expr]
10 ustar command [options] [-find] file1 ... filen [find_expr]
11 tar command [options] file1 ... filen
12 star -copy [options] [-find] file1 ... [f_expr] directory
13 star -copy [options] -C from_directory . to_directory
14
16 Star is a very fast tar(1) like tape archiver with improved functional‐
17 ity.
18
19 Star archives and extracts multiple files to and from a single file
20 called a tarfile. A tarfile is usually a magnetic tape, but it can be
21 any file. In all cases, appearance of a directory name refers to the
22 files and (recursively) subdirectories of that directory.
23
24 Star's actions are controlled by the mandatory command flags from the
25 list below. The way star acts may be modified by additional options.
26
27 Note that unpacking tar archives may be a security risk because star
28 may overwrite existing files. See SECURITY NOTES for more information.
29
31 Star includes the first free implementation of POSIX.1-2001 extended
32 tar headers. The POSIX.1-2001 extended tar headers define a new stan‐
33 dard way for going beyond the limitations of the historic tar format.
34 They allow (among others) to archive all UNIX time stamps in sub-second
35 resolution, files of arbitrary size and filenames without length limi‐
36 tation using UNICODE UTF-8 coding for best exchange compatibility.
37
38 Star by default uses a fifo to optimize data flow from/to tape. This
39 results in a normally streaming tape during the whole backup. See
40 -fifo and fs= option to get information on how to find the best fifo
41 size.
42
43 Star includes a pattern matcher to control the list of files to be pro‐
44 cessed. This gives a convenient interface for archiving and restoring
45 complex lists of files. In conjunction with the -w flag it is easy to
46 merge a tar archive into an existing file tree. See also -U option. In
47 create mode use the pat= option to specify either select or exclude
48 patterns (depending on the -V flag). In extract or list mode all file
49 type arguments are interpreted as select patterns while the patterns
50 specified with the pat= option may be used as select or exclude pat‐
51 terns (depending on the -V flag). Have a look at the description of
52 the -C option to learn how to fetch files from a list of directories
53 (in create mode) or to distribute files to a list of directories (in
54 extract mode). A substitute option allows ed(1) like pattern substitu‐
55 tion in file names.
56
57 Star includes an enhanced function that is similar to the find(1) com‐
58 mand (see sfind(1)). This allows to use find expressions, even in
59 extract or list mode, directly on the content on an archive. The
60 extensions to find(1) allow to modify the file metadata.
61
62 Star includes a sophisticated diff command. Several diff options allow
63 user tailorable functionality. Star won't show you differences you are
64 not interested in. Check the diffopts= option for more details.
65
66 Star has no limitation on filename length. Pathnames and linknames up
67 to PATH_MAX (1023 bytes with old OS versions and 4095 bytes with
68 POSIX.1-2001) may be archived. Later versions may be able to deal with
69 longer pathnames.
70
71 Star deals with all 3 times, available for files on UNIX systems if the
72 archive format is either chosen from the star specific formats or is a
73 format that uses POSIX.1-2001 extended headers. This is either done in
74 second resolution by using a star specific POSIX.1-1988 compatible
75 extension or in sub second resolution by using POSIX.1-2001 extended
76 headers. Star is able to store and restore all 3 times (mtime, atime
77 and even ctime). On Solaris 2.x systems, star is able to do backups
78 without changing any of the 3 the times.
79
80 If used with the H=ustar option, or if called as ustar or tar while the
81 H=headertype option is not used, star is 100% POSIX compliant.
82
83 Star's default format (if called as star) is xstar and is as posix com‐
84 pliant as possible. Enhancements to the standard that prevent correct
85 extraction of single files when using a different tar implementation
86 that is only POSIX.1-1988 compliant may occur, but they only affect
87 single files with a pathname that is longer than 100+130 chars or when
88 archiving sparse files with the -sparse option in effect. All other
89 files will extract correctly. See the description for the H=headertype
90 option below for more information on archive formats and possible ar‐
91 chive interchange problems.
92
93 Star makes it easy to repair corrupted filesystems. After a fsck -y has
94 been run on the filesystem, star is able to restore only the missing
95 files automatically. Use then star -diff to check for differences (see
96 EXAMPLES for more information).
97
98 Star automatically recognizes the type of the archive. Star therefore
99 is able to handle features and properties of different archive types in
100 their native mode, if it knows about the peculiarities of the archive
101 type. See the H=headertype option for more details. To be able to do
102 this, star adds hidden fingerprints to the archive header that allows
103 to recognise all star specific archive formats. The GNU tar format is
104 recognised by the way it deviates from the standard.
105
106 Star automatically recognizes and handles byte swapped archives. There
107 is no option to manually control byte swapping.
108
109 Star automatically recognizes and handles compressed archives inside
110 plain files.
111
112 Star is able to archive and restore Access Control Lists for files
113 using POSIX.1-2001 extended headers.
114
116 In native mode, star is compatible to the command line syntax of a typ‐
117 ical POSIX command and for this reason expects commands and options to
118 start with a single dash (-). In this case, commands and options may be
119 specified separately, all boolean or increment type options may be
120 specified either separately or combined. For compatibility with GNU
121 programs, long options may alternatively start with a double dash. In
122 compatibility mode to POSIX tar, star expects commands and options to
123 appear as one single string that does not start with a dash. In POSIX
124 tar compatibility mode, additional non POSIX options may be specified
125 but must appear after the POSIX options and their args and need to
126 start with a dash.
127
128 -c Create a new tarfile and write named files into it. Writing
129 starts at the beginning of tarfile. See -v option for informa‐
130 tion on how to increase verbosity while the archive is written.
131
132 -copy Copy named files to the target directory which is the last file
133 type argument. The target directory must exist. The shorthand
134 -cx instead of -copy is not allowed because this could be a
135 result of a typo.
136
137 If the option -diff has been specified in addition, star per‐
138 forms a one pass directory tree compare instead of copying
139 files. The shorthand -c -diff instead of -copy -diff is also
140 allowed.
141
142 On operating systems with slow file I/O (such as Linux), it may
143 help to use -no-fsync in addition, but then star is unable to
144 detect all error conditions; so use with care.
145
146 If the option -t has been specified in addition, the last file
147 type argument is not a target directory and star is performing a
148 one pass listing instead of copying files. This makes sense as
149 the listing from star may be better readable than the output
150 from ls -lR. The shorthand -c -t or -ct instead of -copy -t is
151 also allowed.
152
153 The job is by default done in the best archive mode. This
154 implies that it defaults to H=exustar -dump. When in -copy
155 mode, star forks into two processes and data exchange is done
156 via the shared memory from the FIFO. This gives the best possi‐
157 ble performance. Without FIFO, the -copy mode will not work.
158
159 The list= option, patterns and substitutions apply only to the
160 create side of the copy command.
161
162 -diff Compare the content and the attributes of the files from the ar‐
163 chive in tarfile to the filesystem. This may also be used to
164 compare two file trees in the filesystem. If you use a set of
165 diffopts that fits your needs, it will give - in many cases - a
166 more readable output than diff -r. If you use star's dump
167 extensions for the tar archive, the -diff option allows to find
168 even if the directory in the file tree contains more files than
169 the archive. This way, it is possible to compare all properties
170 of two file trees in one run. See diffopts for more details.
171 Adding one or more -v options increases the verbosity. With -vv
172 and above, the directory content is compared also if star is
173 reading a tar archive that has been created in -dump mode.
174
175 -n No extraction. Show what star would do, in case the -x command
176 had been specified.
177
178 -r Replace files in a tarfile. The named files are written to the
179 end of tarfile. This implies that later, the appropriate files
180 will be found more than once on the tarfile.
181
182 -t Table of contents. List the contents of the tarfile. If the -v
183 flag is used, the listing is similar to the format of ls -l out‐
184 put. With this option, the flags -a, -atime and -ctime have a
185 different meaning if the archive is in star, xstar, xustar,
186 exustar, or pax format. The option -a or -atime lists the
187 access time instead of the modification time, the option -ctime
188 lists the file creation time instead of the modification time.
189 The option -tpath may be used in addition to modify the output
190 so it may be used in shell scripts.
191
192 -u Update a tarfile. The named files are written to the end of
193 tarfile if they are not already there or if the files are newer
194 than the files of the same name found in the archive. The -r
195 and -u command only work if the tar archives is a regular file
196 or if the tar archive is an unblocked tape that may backspace.
197
198 -x Extract the named files from the tarfile. If no filename argu‐
199 ment or pattern is specified, the entire content of the tarfile
200 is restored. If the -U flag is not used, star extracts no file
201 which is older than the corresponding file on disk.
202
203 On operating systems with slow file I/O (such as Linux), it may
204 help to use -no-fsync in addition, but then star is unable to
205 detect all error conditions; so use with care.
206
207 Except for the shorthands documented above, exactly one of the commands
208 above must be specified.
209
210 If one or more patterns or substitution commands have been specified,
211 they apply to any of the command listed above. In copy mode, all pat‐
212 terns and substitute commands apply to the create side.
213
214
216 -help Print a summary of the most important options for star(1).
217
218 -xhelp Print a summary of the less important options for star(1).
219
220 -/ Don't strip leading slashes from file names when extracting an
221 archive. Tar archives containing absolute pathnames are usually
222 a bad idea. With other tar implementations, they may possibly
223 never be extracted without clobbering existing files. Star for
224 that reason, by default strips leading slashes from filenames
225 when in extract mode. As it may be impossible to create an ar‐
226 chive where leading slashes have been stripped while retaining
227 correct path names, star does not strip leading slashes in cre‐
228 ate mode.
229
230 See SECURITY NOTES for more information.
231
232 -.. Don't skip files that contain /../ in the name. Tar archives
233 containing names with /../ could be used to compromise the sys‐
234 tem. If they are unpacked together with a lot of other files,
235 this would in most cases not even be noticed. For this reason,
236 star by default does not extract files that contain /../ in the
237 name if star is not in interactive mode (see -w option).
238
239 See SECURITY NOTES for more information.
240
241 -7z run the input or output through a p7zip pipe - see option -z
242 below.
243
244 Note that the p7zip program currently does not operate on a pipe
245 but on a /tmp file copy and thus limits the maximum archive
246 size.
247
248
249 -0
250
251 -1
252
253 -2
254
255 -3
256
257 -4
258
259 -5
260
261 -6
262
263 -7 Select an archive entry from /etc/default/star. The format for
264 the archive entries is the same as the format in
265 /etc/default/tar in Solaris.
266
267 -acl Handle Access Control List (ACL) information in create and
268 extract mode. If -acl has been specified, star is in create
269 mode and the header type is exustar, star will add ACL informa‐
270 tion to the archive using POSIX.1-2001 extended headers. If
271 -acl has been specified and star is in extract mode, star will
272 try to restore ACL information. If there is no ACL information
273 for one or all files in the archive, star will clear the ACL
274 information for the specific file. Note that if -acl has not
275 been specified, star will not handle ACL information at all and
276 files may inherit ACL information from the parent directories.
277 If the -acl option has been specified, star assumes that the -p
278 option has been specified too.
279
280 artype=headertype
281 Generate a tape archive in headertype format. If this option is
282 used in extract/list mode this forces star to interpret the
283 headers to be of type headertype. As star even in case of a
284 user selected extract archive format does format checking, it
285 may be that you will not be able to unpack a specific archive
286 with all possible forced archive formats. Selecting the old tar
287 format for extraction will always work though. Valid parameter
288 for headertype are:
289
290 help Print a help message about possible header types.
291
292 v7tar Old UNIX V7 tar format. This archive format may only
293 store plain files. Pathnames or linknames longer than
294 99 chars may not be archived.
295
296 If the v7tar format has been selected, star will not
297 use enhancements to the historic UNIX V7 tar format.
298 File size is limited to 2 GB - 2 bytes, uid/gid is
299 limited to 262143. Sparse files will be filled up
300 with zeroes.
301
302 tar Old BSD UNIX tar format. This archive format may only
303 store plain files, directories and symbolic links.
304 Pathnames or linknames longer than 99 chars may not be
305 archived. See also the -d option as a note to some
306 even older tar implementations.
307
308 If the tar format has been selected, star will not use
309 enhancements to the historic tar format. File size is
310 limited to 2 GB - 2 bytes, uid/gid is limited to
311 262143. Sparse files will be filled up with zeroes.
312
313 star Old star standard format. This is an upward/downward
314 compatible enhancement of the old (pre Posix) UNIX tar
315 format. It has been introduced in 1985 and therefore
316 is not Posix compliant. The star format allows to ar‐
317 chive special files (even sockets) and records access
318 time and creation time besides the modification time.
319 Newer versions of the old star format allow very long
320 filenames (100+155 chars and above), linknames > 100
321 chars and sparse files (if -sparse is used). This
322 format is able to copy the device nodes on HP-UX that
323 have 24 bits in the minor device number, which is more
324 then the 21 bits that are possible with the
325 POSIX-1003.1-1988 archive format.
326
327 The nonstandard extensions are located in the space
328 between the link name and the POSIX file name prefix.
329 As the star format does not use a POSIX magic string,
330 the extensions do not interfere with the POSIX tar
331 formats. The last 4 bytes of the tar header contain a
332 'tar\0' signature.
333
334 gnutar This is a commonly used, but unfortunately not Posix
335 compliant (although designed after 1987) enhancement
336 to the old tar format. The gnutar format has been
337 defined between 1989 and 1994. Do not use the gnutar
338 archive format unless you want to create an archive
339 for a target system that is known to have only the
340 gnutar program available. The gnutar archive format
341 violates basic rules for any (even the historic) tar
342 archive format, in special when sparse files are
343 archived using the -sparse option. Using the gnutar
344 archive format causes a high risk that the resulting
345 archive may only be read by gnutar or by star. The
346 implementation of the gnutar archive format within
347 star is not complete, but sufficient for most gnutar
348 archives. See NOTES for more information.
349
350 ustar IEEE/Posix1003/IEC-9945-1-1988 Standard Data Inter‐
351 change format. With this option in effect, star will
352 generate 100% POSIX.1-1988 compliant tar archives.
353 Files with pathnames longer than 100+155 chars or
354 linknames longer than 100 chars may not be archived.
355 If star is called as ustar the default archive format
356 is ustar.
357
358 If the ustar format has been selected, star will not
359 use enhancements to the POSIX.1-1988 tar format, the
360 archive will be strictly conforming. File size is
361 limited to 8 GB, uid/gid/major/minor is limited to
362 2097151. Sparse files will be filled up with zeroes.
363
364 pax The IEEE/Posix1003/IEC-9945-1-1988 successor is the
365 POSIX-1003.1-2001 Standard Data Interchange format.
366 It is called the pax archive format.
367
368 If the pax format has been selected, star will not use
369 enhancements to the POSIX.1-2001 tar format, the ar‐
370 chive will be strictly conforming. File size is
371 unlimited, uid/gid/uname/gidname is unlimited,
372 major/minor is limited to 2097151. Sparse files will
373 be filled up with zeroes.
374
375 xstar The extended standard tar format has been introduced
376 in 1994. Star uses the xstar format as default ar‐
377 chive format. This is an upward/downward compatible
378 enhancement of the IEEE/Posix1003/IEC-9945-1 Standard
379 Data Interchange format. It allows among others very
380 long filenames (100+130 chars and above) and records
381 access time and creation time. Sparse files will be
382 archived correctly (if -sparse is used).
383
384 The access time and creation time are stored at the
385 end of the POSIX file name prefix (this limits the
386 prefix to 130 chars). These extensions do not inter‐
387 fere with the POSIX standard as the fields for mtime
388 and ctime field are always separated from the POSIX
389 file name prefix by a null byte. The last 4 bytes of
390 the tar header contain a 'tar\0' signature.
391
392 The xstar format is the default format when star is
393 neither called as tar nor called as ustar.
394
395 xustar A new format introduced 1998, that omits the 'tar\0'
396 signature at the end of the tar header. It is other‐
397 wise identical to the xstar format. As some tar
398 implementations do not follow the POSIX rules and com‐
399 pute the checksum for less than 512 bytes of the tar
400 header, this format may help to avoid problems with
401 these broken tar implementations. The main other dif‐
402 ference to the xstar format is that the xustar format
403 uses POSIX.1-2001 extended headers to overcome limita‐
404 tions of the historic tar format while the xstar for‐
405 mat uses proprietary extensions. The xustar format is
406 the default format when star is called as tar.
407
408 File size is unlimited, uid/gid/uname/gidname is
409 unlimited, major/minor is unlimited. Sparse files
410 will be archived correctly (if -sparse is used).
411
412 exustar A format similar to the xustar format but with forced
413 POSIX.1-2001 extended headers. If this format is used
414 together with the -acl option, star records Access
415 Control Lists (ACLs) in POSIX.1-2001 extended headers.
416
417 The exustar format allows to archive all file types
418 but it does not archive more than the POSIX.1-1988 set
419 by default. If the -dump option is used or if star is
420 otherwise on dump mode, star archives all file types
421 and in addition archives more meta data then usual.
422
423 File size is unlimited, uid/gid/uname/gidname is
424 unlimited, major/minor is unlimited. Sparse files
425 will be archived correctly (if -sparse is used).
426
427 suntar The extended header format found on Solaris 7/8/9.
428 This format is similar to the pax format but does not
429 handle atime and ctime and in addition uses 'X' as the
430 typeflag for the extended headers instead of the stan‐
431 dard 'x'.
432
433 File size is unlimited, uid/gid/uname/gidname is
434 unlimited, major/minor is unlimited. Sparse files
435 will be filled up with zeroes.
436
437 bin The cpio UNIX V7 binary format. This is a format with
438 big interoperability problems. Try to avoid this for‐
439 mat. It is only present to make the scpio command
440 SVr4 compliant.
441
442 cpio The POSIX.1-1988 cpio format. This format uses octal
443 ascii headers. A similar format is created by calling
444 cpio -o -c on pre SYSVr4 systems and by calling cpio
445 -o -Hodc on SYSVr4 systems. The POSIX.1-1988 cpio
446 format allows a file name length up to 262142 charac‐
447 ters and allows to archive nearly any file type. File
448 size is limited to 8 GB, uid/gid/st_dev is limited to
449 262143. The way major and minor device numbers are
450 stored inside the st_dev field is implementation
451 dependent.
452
453 Even though this archive format is covered by the
454 POSIX.1-1988 standard, it has a lower portability than
455 the ustar format. Try to avoid the cpio archive for‐
456 mat.
457
458 odc This archive format is similar to the The POSIX.1-1988
459 cpio format but the file name length is limited to 255
460 characters and the socket file type is not allowed.
461 This archive format has been introduced to allow non
462 POSIX cpio implementations such as the cpio program on
463 SYSV to accept the archive. Use this format whenever
464 you are not sure if the target system offers a fully
465 POSIX compliant cpio program.
466
467 Even though this archive format is covered by the
468 POSIX.1-1988 standard, it has a lower portability than
469 the ustar format. Try to avoid the odc archive format.
470
471 asc Tell star to create a cpio archive in the ascii format
472 that is created with cpio -o -c on SYSVr4 systems. It
473 uses extended (32 bit) numbers for uid's, gid's and
474 device numbers but limits the file size to 4 GB - 2
475 bytes although the format has been specified after the
476 POSIX.1-1988 cpio format. Try to avoid the asc ar‐
477 chive format because of its limited portability.
478
479 crc This format is similar to the asc cpio format but in
480 addition uses a simple byte based checksum called CRC.
481 Try to avoid the crc archive format because of its
482 limited portability.
483
484
485 All tar archive formats may be interchanged if the archive con‐
486 tains no files that may not be archived by using the old tar
487 format. Archives in the xstar format may be extracted by any
488 100% POSIX compliant tar implementation if they contain no files
489 with pathnames > 100+130 chars and if they contain no sparse
490 files that have been archived by using the -sparse option.
491
492
493 -ask_remove
494 obsoleted by -ask-remove
495
496 -ask-remove
497 Ask to remove non writable files on extraction. By default,
498 star will not overwrite files that are read only. If this
499 option is in effect, star will ask whether it should remove
500 these files to allow the extraction of a file in the following
501 way:
502
503 remove 'filename' ? Y(es)/N(o) :
504
505 -atime, -a
506 Reset access time of files after storing them to tarfile. On
507 Solaris 2.x, (if invoked by root) star uses the _FIOSATIME ioctl
508 to do this. This enables star not to trash the ctime while
509 resetting the atime of the files. If the -atime option is used
510 in conjunction with the list command, star lists access time
511 instead of modification time. (This works only in conjunction
512 with the star, xstar, xustar, exustar, and with the pax format.)
513 Another option to retain the access time for the the files that
514 are going to be archives is to readonly mount a UFS snapshot and
515 to archive files from the mount point of the UFS snapshot.
516
517 -B Force star to perform multiple reads (if necessary) to fill a
518 block. This option exists so that star can work across the Eth‐
519 ernet, since pipes and sockets return partial blocks even when
520 more data is coming. If star uses stdin as archive file, star
521 behaves as if it has been called with the -B option. For this
522 reason, the option -B in practice is rarely needed.
523
524 -block-number
525 Print the archive block number (archive offset / 512) at the
526 beginning of each line when in verbose mode. This allows to
527 write backup scripts that archive the offsets for files and that
528 use
529
530 mt fsr blockno
531
532 to skip to the tape block number of interest in a fast way if a
533 single file needs to be restored.
534
535 blocks=#, b=#
536 Set the blocking factor of the tarfile to # times 512 bytes
537 (unless a different multiplication factor has been specified -
538 see bs= option for possible multiplication factors). Changing
539 the blocking factor only makes sense when the archive is located
540 on a real tape device or when the archive is accessed via the
541 remote tape protocol (see f= option below). The default is to
542 use a blocking factor of 20 i.e. 10 kBytes. Increasing the
543 blocksize will speed up the backup. For portability with very
544 old tar implementations (pre BSD 4.2 or pre AT&T SVR4), block‐
545 size should not be more than 10 kBytes. For POSIX.1-1988 com‐
546 patibility, blocksize should be no more than 10 kBytes. For
547 POSIX.1-2001 compatibility, blocksize should be no more than
548 32 kBytes. Most systems also have a hardware limitation for the
549 blocksize, 32 kBytes and 63 kBytes are common limits on many
550 systems. The upper limit in any case is the size of the buffer
551 RAM in the tape drive. Make a test if you want to make sure
552 that the target system will handle the intended blocksize. If
553 you use star for data exchange via tape, it is a good idea to
554 use a blocksize of 10 kBytes unless you are sure that the read‐
555 ing system will handle a larger blocksize. If you use star for
556 backup purposes with recent hardware (e.g. DLT tape drives), a
557 blocksize of 256 kBytes results in sufficient speed and seems to
558 be a good choice. Star allows block sizes up to 2 GByte if the
559 system does not impose a smaller limit. If you want to deter‐
560 mine the blocking factor when reading an unknown tar archive on
561 tape, specify a blocking factor that is higher than the supposed
562 blocking factor of the tape. Star then will determine the
563 blocking factor by reading the first record of the tape and
564 print a message:
565
566 star: Blocksize = # records.
567
568 Where # is the blocking factor in multiples of 512 bytes. The
569 blocks= option and the bs= option are equivalent methods to
570 specify the tape block size. The blocks= option is preferred by
571 people who like to use an option that behaves similar to the
572 interface of the historic tar(1) implementations.
573
574 bs=# Set output block size to #. You may use the same method as in
575 dd(1) and sdd(1). The number representing the size is taken in
576 bytes unless otherwise specified. If a number is followed
577 directly by the letter `.', `w', `b', `k', `m', `g', `t', or
578 `p', the size is multiplied by 1, 2, 512, 1024, 1024*1024,
579 1024*1024*1024, 1024*1024*1024*1024 or 1024*1024*1024*1024*1024.
580 If the size consists of numbers separated by `x' or `*', multi‐
581 plication of the two numbers is performed. Thus bs=7x8k will
582 specify a blocksize of 56 kBytes. Blocksize must be a multiple
583 of 512 bytes. See also the description of the blocks= option
584 for more details on blocksizes. The option bs= is preferred by
585 people who like to use an option that behaves similar to the
586 interface used by dd(1) and sdd(1).
587
588 -bsdchdir
589 Switch the behavior of the C= option to BSD style. The default
590 behavior of star is to stay in a working directory until a new
591 C= is seen. With BSD tar, the C= option is only related to the
592 next file type argument.
593
594 -bz run the input or output through a bzip2 pipe - see option -z -Z
595 and -j below. As the -bz the -j the -Z and the -z option are
596 non standard, it makes sense to omit the -bz the -j the -Z and
597 the -z options inside shell scripts if you are going to extract
598 a compressed archive that is located inside a plain file as star
599 will auto detect compression and choose the right decompression
600 option to extract.
601
602 C=dir
603
604 -C dir Perform a chdir(2) operation to dir before storing or extracting
605 the next files. In all cases, star will perform the chdir(2)
606 operation relative to the current working directory of the
607 shell.
608
609 · In list mode (with the -t flag), star ignores all -C
610 options.
611
612 · In create mode (with the -c, -r and -u flag), star walks
613 through all -C options and file type arguments. While a
614 BSD derived tar(1) implementation goes back to the cur‐
615 rent working directory after storing one file argument
616 that immediately follows the -C option, star changes the
617 directory only if a new -C option follows. To emulate
618 the behavior of a BSD derived tar(1), add a -C . option
619 after the file argument.
620
621 · In extract mode (with the -x, -n and -diff flag), star
622 builds a pattern list together with corresponding direc‐
623 tories from previous C=dir options and performs a
624 chdir(2) to the corresponding directory of a matching
625 pattern. All pat= options that do not follow a C=dir
626 option are interpreted as if they were preceded by a -C .
627 option. See EXAMPLES for more information.
628
629 compress-program=name
630 Set a named compress program. The program must compress in a
631 pipe when called without parameters and decompress when run with
632 the -d option in a pipe. This option is otherwise similar to
633 the -z the -j the -Z and the -bz option.
634
635 -copydlinks
636 Try to recursively copy the content of linked directories
637 instead of creating the link. This is an experimental feature
638 that may help to unpack archives on DOS.
639
640 -copyhardlinks
641 This option allows to copy hardlinked targets rather than creat‐
642 ing the link. It helps to extract tar files on systems that do
643 not implement hardlinks (e.g. BeOS).
644
645 -copylinks
646 This option allows to copy both, hard- and symlinked targets
647 rather than creating a link. It helps to extract tar files on
648 systems that do not implement links (e.g. OS/2). To extract and
649 copy all symlinks correctly, you may need to call star twice as
650 star cannot copy files that appear in the archive later than a
651 symlink pointing to them.
652
653 -copysymlinks
654 This option allows to copy symlinked targets rather than creat‐
655 ing a symbolic link. It helps to extract tar files on systems
656 that do not implement links (e.g. OS/2). To extract and copy
657 all symlinks correctly, you may need to call star twice as star
658 cannot copy files that appear in the archive later than a sym‐
659 link pointing to them.
660
661 -cpio-statistics
662 Instead of the star flavor of the statistics, print statistics
663 in cpio flavor.
664
665 -ctime If used with the list command, this lists ctime rather than
666 mtime if the archive format is star, xstar, xustar, exustar, or
667 pax.
668
669 If star is run as root and if -ctime is used with the extract
670 command and the same archive formats, this causes star to try to
671 restore even the ctime of a file by generating time storms. You
672 should not do this when in multi user mode because this may con‐
673 fuse programs like cron and the news system. Although star
674 tries to eliminate the accumulative effects of the time storm,
675 there is a tendency for the system clock to slow down a bit.
676 The clock typically lags about one millisecond per extracted
677 file. Use with care and check the system clock after using this
678 feature.
679
680 If used with the create command this changes the behavior of the
681 newer= option. Star, in this case compares the ctime of all
682 files to the mtime of the stamp file rather then comparing the
683 mtimes of both files.
684
685 -cumulative
686 A shorthand for -dump-cumulative. See -dump-cumulative for more
687 information.
688
689 -D Do not descend directories. Normally, star descends the whole
690 tree if it encounters a directory in in its file parameters.
691 The option -D is in effect by default if the list=file option is
692 used. If you like star to descend directories found in the list
693 file, use the -dodesc option (see below).
694
695 -d Do not store/create directories. Old versions of tar such as
696 published with the seventh edition of UNIX are not able to deal
697 with directories in tar archives. If a tar archive is generated
698 without directories this avoids problems with tar implementa‐
699 tions found on SYSVr3 and earlier. If used during extract, no
700 intermediate missing directories are created.
701
702 -data-change-warn
703 If the size of a file changes while the file is being archived,
704 treat this condition as a warning only that does not cause a non
705 zero exit code. A warning message is still written if the con‐
706 dition is not otherwise ignored by another rule from an errctl=
707 option. The -data-change-warn option works as if the last error
708 control option was
709
710 errctl="WARN|GROW|SHRINK *"
711
712 The -e option or an ABORT entry in a condition set up by errctl=
713 has a higher precedence than the -data-change-warn option. This
714 option is ignored in extract or list mode.
715
716 -debug Print debug messages. Among other things, this gives debug mes‐
717 sages for header type recognition, tar type properties, EOF
718 recognition, opening of remote archives and fifo internals.
719
720 diffopts=optlst
721 Comma separated list of diffopts. Valid members in optlst are:
722
723 help Print a summary of possible members of the diffopts
724 list.
725
726 ! Invert the meaning of the following string. No comma
727 is needed after the exclamation mark.
728
729 not Invert the meaning of all members in the diffopts list
730 i.e. exclude all present options from an initially
731 complete set compare list. When using csh(1) you
732 might have problems to use ! due to its strange
733 parser. This is why the not alias exists.
734
735 perm Compare file permissions. With this option in effect,
736 star compares the low order 12 bits of the st_mode
737 field.
738
739 mode Same as perm.
740
741 symperm Compare permissions even in case the target file on
742 the local filesystem is a symbolic link. By default,
743 star will not compare the permission of symbolic links
744 as most systems cannot set the permission of symbolic
745 links. Star compares symperm only if perm is compared
746 also.
747
748 type Compare file type. Note that star cannot compare the
749 file type in case of a hard link.
750
751 nlink Compare link count on hardlinks. This only works if
752 the archive is in exustar format and contains star's
753 dump extensions.
754
755 uid Compare numerical user id of file.
756
757 gid Compare numerical group id of file.
758
759 uname Compare ASCII version of user id of file. The user
760 name is mapped via the file /etc/passwd.
761
762 gname Compare ASCII version of group id of file. The group
763 name is mapped via the file /etc/group.
764
765 id Shorthand for: uid,gid,uname,gname. Compare all
766 user/group related info of file. Note that this will
767 always find differences if the source and target sys‐
768 tem use different user or group mappings.
769
770 size Compare file size. Note that star cannot compare the
771 file size in case of a hard link.
772
773 data Compare content of file. If star already found that
774 the size of the files differ, it will not compare the
775 content anymore. If the size of the files differ,
776 star will always report different data.
777
778 cont Same as data.
779
780 rdev Compare major/minor numbers for device nodes.
781
782 hardlink Compare target of hardlinks.
783
784 symlink Compare target of symlinks. This evaluates the paths
785 returned by the readlink(2) call.
786
787 Two symlinks are considered equal, it they either have
788 a characterwise identical link-name, or if they either
789 both use an absolute path name or both use a relative
790 path name and the following is true: Both symlinks
791 point to the same file that must exist or both path‐
792 names look similar enough.
793
794 sympath Compare the target pathnames of symlinks. This charac‐
795 terwise compares the strings returned from the read‐
796 link(2) call.
797
798 sparse Compare if either both files are sparse or not. If
799 only one of both files is sparse, then a difference is
800 flagged. This only works with if the archive format
801 is star, xstar, xustar, exustar, or gnutar.
802
803 atime Compare access time of file. This only works with if
804 the archive format is star, xstar, xustar, exustar, or
805 pax.
806
807 mtime Compare modification time of file.
808
809 ctime This only works with if the archive format is star,
810 xstar, xustar, exustar, or pax.
811
812 lmtime Compare the modification time even in case the target
813 file on the local filesystem is a symbolic link. By
814 default, star will not compare the modification time
815 of symbolic links as most systems cannot set the modi‐
816 fication time of symbolic links. Star compares lmtime
817 only if mtime is compared also.
818
819 times Shorthand for: atime,mtime,ctime.
820
821 dir Compare the content of directories. This only works
822 if the archive is in exustar format and contains
823 star's dump extensions. Together with increased ver‐
824 bose level (-vv) this will print a list of files that
825 are only in the archive and a list of files that are
826 only on the current filesystem.
827
828 xtimes Shorthand for: atime,mtime,ctime,lmtime.
829
830 acl Compare access control lists. This only works if the
831 archive is in exustar format and has been created with
832 star's -acl option. You need to specify the -acl
833 option in addition when running the diff.
834
835 xattr Compare extended file attributes. This only works if
836 the archive is in exustar format and has been created
837 with star's -xattr option. You need to specify the
838 -xattr option in addition when running the diff.
839
840 fflags Compare extended file flags. This only works if the
841 archive is in exustar format and has been created with
842 star's -xfflags option. You need to specify the
843 -xfflags option in addition when running the diff.
844
845 If optlst starts with a ! the meaning of all members in optlst
846 is inverted as with the not optlist member. In this case, star
847 starts with a complete list that includes atime and lmtime.
848 Reasonable diff options to use when comparing against a copy of
849 a directory tree are diffopts=!atime,ctime,lmtime.
850
851 If diffopts are not specified, star compares everything but the
852 access time of the files and the modification time of symbolic
853 links.
854
855 dir-group=group
856 If star extracts archives as root, this option allows to control
857 the group id of intermediate directories created by star.
858
859 dir-owner=user
860 If star extracts archives as root, this option allows to control
861 the owner of intermediate directories created by
862
863 -dirmode
864 If in create mode (i.e. when storing files to archive), star
865 stores directories past the corresponding files. This guarantees
866 that even old tar implementations without a directory cache will
867 be able to restore the correct times of directories. The option
868 -dirmode should only be used if the archive needs to be
869 extracted by an old tar implementation. If star is used to
870 extract an archive that has been created with -dirmode the
871 directories will not get an old time stamp unless the option -U
872 is used while extracting the archive.
873
874 -dodesc
875 Force star to descend directories found in a list=file. See
876 also the -D option above.
877
878 -dump Allows to create archives with the same number of attributes as
879 an archive that has been created with the level= option but
880 without the restrictions that apply to a true dump.
881
882 The resultant archive may be seen as a level-less dump which
883 includes similar attributes as a level 0 dump but may span more
884 than a single file system and does not need to use a -C option.
885 It has been originally introduced to make it easier to implement
886 a star version that supports true incremental dumps, but it is
887 kept as it gives additional benefits. Star currently sets the
888 archive type to exustar and, in addition archives more inode
889 meta data inside POSIX.1-2001 extended headers. See also level=
890 option and the section INCREMENTAL BACKUPS for more information
891 on true incremental dumps.
892
893 -dump-cumulative
894 instructs star to perform incremental dumps relatively to the
895 last incremental dump of the same level. Incremental dumps with
896 a level higher than 0 are normally done relatively to the con‐
897 tent of a previous dump with lower level. If incremental dumps
898 and restores are going to be used to synchronize filesystem con‐
899 tent, every successive incremental dump will increase in size if
900 -dump-cumulative is not used. See section SYNCHRONIZING
901 FILESYSTEMS for more information.
902
903
904 dumpdate=name
905 Tells star to use the mtime of the time stamp file name instead
906 of using the start time of star. This is needed when star is
907 run on file system snapshots. If star would use the the start
908 time with snapshots, all files that have been modified between
909 the setup of the snapshot and the start of star would be missing
910 on the backup.
911
912 -dumpmeta
913 changes the behavior of star in incremental dump mode. If
914 -dumpmeta is used and only the inode change time (st_ctime) of a
915 file has been updated since the last incremental dump, star will
916 archive only the meta data of the file (e.g. uid, permissions,
917 ...) but not the file content. Using -dumpmeta will result in
918 smaller incremental dumps, but files that have been created
919 between two incrementals and set to an old date in st_mtime
920 (e.g. as a result from a tar extract) will not be archived with
921 full content. Using -dumpmeta thus may result in incomplete
922 incremental dumps, use with extreme care.
923
924 -e Exit immediately with exit status -3 (253) if any unexpected
925 error occurs. The -e option works as if the last error control
926 option was
927
928 errctl="ABORT|ALL|DIFF *"
929
930 This allows to use the errctl= option together with the -e
931 option and thus to ignore some error conditions while aborting
932 on all other conditions.
933
934 errctl= name
935
936 errctl= error control spec
937 Add the content from file name to the error control definitions
938 or add error control spec to the error control definitions.
939 More than one error control file and more than one error control
940 spec as well as a mixture of both forms is possible.
941
942 The reason for using error control is to make star quiet about
943 error conditions that are known to be irrelevant on the quality
944 of the archive or restore run or to tell star to abort on cer‐
945 tain error conditions instead of trying to continue with the ar‐
946 chive.
947
948 A typical reason to use error control is to suppress warnings
949 about growing log files while doing a backup on a live file sys‐
950 tem. Another typical reason to use error control is to tell
951 star to abort if e.g. a file could not be archived instead of
952 continuing to archive other files from a list.
953
954 The error control file contains a set of lines, each starting
955 with a list of error conditions to be ignored followed by white
956 space followed by a file name pattern (see match(1) or pat‐
957 match(3) for more information). The error control spec uses the
958 same syntax as a single line from the error control file. If
959 the file name pattern needs to start with white space, use a
960 backslash to escape the start of the file name. It is not possi‐
961 ble to have new line characters in the file name pattern. When‐
962 ever an error situation is encountered, star checks the lines in
963 the error control file starting from the top. If the current
964 error condition is listed on a line in the error control file,
965 then star checks whether the pattern on the rest of the line
966 matches the current file name. If this is the case, star uses
967 the current error control specification to control the current
968 error condition.
969
970 The list of error conditions to be handled may use one or more
971 (in this case separated by a '|' character) identifiers from the
972 list below:
973
974 ABORT If this meta condition is included in an error con‐
975 dition, star aborts (exits) as soon as possible
976 after this error condition has been seen instead of
977 making star quiet about the condition. This error
978 condition flag may only be used together with at
979 another error condition or a list of error condi‐
980 tions (separated by a '|' character).
981
982 WARN If this meta condition is included in an error con‐
983 dition, star prints the warning about the error con‐
984 dition but the error condition does not affect the
985 exit code of star and the error statistics (which is
986 printed to the end) does not include the related
987 errors. This error condition flag may only be used
988 together with at another error condition or a list
989 of error conditions (separated by a '|' character).
990 The WARN meta condition has a lower precedence than
991 ABORT.
992
993 DIFF Suppress output in case that star -diff did
994 encounter any differences.
995
996 ALL This is a shortcut for all error conditions below.
997
998 STAT Suppress warnings that star could not stat(2) a
999 file.
1000
1001 GETACL Suppress warnings about files on which star had
1002 problems to retrieve the ACL information.
1003
1004 OPEN Suppress warnings about files that could not be
1005 opened.
1006
1007 READ Suppress warnings read errors on files.
1008
1009 WRITE Suppress warnings write errors on files.
1010
1011 READLINK Suppress warnings readlink(2) errors on symbolic
1012 links.
1013
1014 GROW Suppress warnings about files that did grow while
1015 they have been archived.
1016
1017 SHRINK Suppress warnings about files that did shrink while
1018 they have been archived.
1019
1020 MISSLINK Suppress warnings about files for which star was
1021 unable to archive all hard links.
1022
1023 NAMETOOLONG Suppress warnings about files that could not be
1024 archived because the name of the file is too long
1025 for the archive format.
1026
1027 FILETOOBIG Suppress warnings about files that could not be
1028 archived because the size of the file is too big for
1029 the archive format.
1030
1031 SPECIALFILE Suppress warnings about files that could not be
1032 archived because the file type is not supported by
1033 the archive format.
1034
1035 GETXATTR Suppress warnings about files on that star could not
1036 retrieve the extended file attribute information.
1037
1038 SETTIME Suppress warnings about files on that star could not
1039 set the time information during extraction.
1040
1041 SETMODE Suppress warnings about files on that star could not
1042 set the access modes during extraction.
1043
1044 SECURITY Suppress warnings about files that have been skipped
1045 on extraction because they have been considered to
1046 be a security risk. This currently applies to all
1047 files that have a '/../' sequence inside when -..
1048 has not been specified.
1049
1050 LSECURITY Suppress warnings about links that have been skipped
1051 on extraction because they have been considered to
1052 be a security risk. This currently applies to all
1053 link names that start with '/' or have a '/../'
1054 sequence inside when -secure-links has been speci‐
1055 fied. In this case, star tries to match the link
1056 name against the pattern in the error control file.
1057
1058 SAMEFILE Suppress warnings about links that have been skipped
1059 on extraction because source and target of the link
1060 are pointing to the same file. If star would not
1061 skip these files, it would end up with removing the
1062 file completely. In this case, star tries to match
1063 the link name against the pattern in the error con‐
1064 trol file.
1065
1066 BADACL Suppress warnings access control list conversion
1067 problems.
1068
1069 SETACL Suppress warnings about files on that star could not
1070 set the ACL information during extraction.
1071
1072 SETXATTR Suppress warnings about files on that star could not
1073 set the extended file attribute information during
1074 extraction.
1075
1076 If a specific error condition is ignored, then the error condition is
1077 not only handled in a silent way but also excluded from the error sta‐
1078 tistics that are printed at the end of the star run.
1079
1080 Be very careful when using error control as you may ignore any error
1081 condition. If you ignore the wrong error conditions, you may not be
1082 able to see real problems anymore.
1083
1084 -exclude-from name
1085 Exclude from named file, this is an alias for the -X option. See
1086 -X option for more information.
1087
1088 -F,-FF ...
1089 Fast and simple exclude option for create mode. With one -F
1090 argument, star ignores all directories called SCCS and RCS.
1091 With two -F arguments, star in addition ignores all files called
1092 core errs a.out all files ending with .o. OBJ/. With three -F
1093 arguments, star ignores all sub trees starting from a directory
1094 that includes a file .mirror or .exclude and all object files
1095 and files called core errs a.out all files ending with .o. With
1096 four -F arguments, star ignores all sub trees starting from a
1097 directory that includes a file .mirror or .exclude the latter
1098 files are excluded too as well as and all object files and files
1099 called core errs a.out all files ending with .o. With five -F
1100 arguments, star in addition again excludes all directories
1101 called SCCS and RCS.
1102
1103 -fifo Use a fifo to optimize data flow from/to tarfile. This option
1104 is in effect by default (it may be changed at compile time).
1105 The default fifo size is 8 MBytes on all platforms except Linux
1106 versions that do not support mmap() (4 MB because kernels before
1107 2.4 did not handle big shared memory areas) and Sun/mc68000 (1
1108 MB). This will star make even work on a tiny machine like a Sun
1109 3/50. The fifo size may be modified with the fs= option. A rule
1110 of dumb for the fifo size is to use more than the buffer size of
1111 the tape drive and less then half of the real memory of the
1112 machine. A good choice would be to use a fifo size between 8
1113 and 256 MB. This may increase backup speed up to 5% compared to
1114 the speed achieved with the default fifo size. Note that with a
1115 DLT drive that gives 12MB/s transfer rate, a fifo of 256 MB size
1116 will keep the tape at least streaming in units of 20 seconds.
1117 All options that start with the -f sequence are sensitive to
1118 typo problems, see BUGS section for more information.
1119
1120 -fifostats
1121 Print fifo statistics at the end of a star run when the fifo has
1122 been in effect. All options that start with the -f sequence are
1123 sensitive to typo problems, see BUGS section for more informa‐
1124 tion.
1125
1126 file=tarfilename, f=tarfilename
1127 Use tarfilename as the name for the tar archive. Currently up to
1128 100 file= options are possible. Specifying more then one file=
1129 option make sense in multi volume mode. In this case star will
1130 use the next name in the list every time a media change is
1131 needed. To make star behave consistent with the single file
1132 case, star loops over the list of known archive files. Note
1133 that if star is installed suid root and the first tarfile is a
1134 remote archive, only the connection to this archive will be cre‐
1135 ated with root privileges. After this connection has been
1136 established as root, star switches back to the id of the caller.
1137 If any of the other archives in the list is located on a differ‐
1138 ent host, star will not be able to open this archive later on,
1139 unless run by root.
1140
1141 Star normally uses stdin/stdout for the tar archive because the
1142 most common way to use star is in conjunction with pipes. If
1143 star is installed suid root or if it has been called by root,
1144 tarfilename may be in remote syntax: user@host:filename as in
1145 rcp(1) even if invoked by non root users. See SUID NOTES for
1146 more information.
1147
1148 To make a file local although it includes a colon (:), the file‐
1149 name must start with: '/', './' or '../'
1150
1151 Note that if star talks to an old rmt remote tape server that
1152 does not support symbolic open modes, it does not open a remote
1153 tape with the O_CREAT open flag because this would be extremely
1154 dangerous. If the rmt server on the other side is the rmt
1155 server that comes with star or the GNU rmt server, star may use
1156 the symbolic mode for the open flags. Only the symbolic open
1157 modes allow to send all possible open modes in a portable way to
1158 remote tape servers.
1159
1160 It is recommended to use the rmt server that comes with star.
1161 It is the only rmt server that gives platform independent com‐
1162 patibility with BSD, Sun and GNU rmt clients and it includes
1163 security features that may be set up in /etc/default/rmt. All
1164 options that start with the -f sequence are sensitive to typo
1165 problems, see BUGS section for more information.
1166
1167 See ENVIRONMENT section for information on how to use ssh(1) to
1168 create a remote tape server connection.
1169
1170 Note that if file=- has been specified, it is no longer possible
1171 to use the -find -exec primary.
1172
1173 -find This option acts a separator. If it is used, all star options
1174 must be to the left of the -find option. To the right of the
1175 -find option, star accepts the find command line syntax only.
1176
1177 The find expression acts as a filter between the source of file
1178 names and the consumer, which may either be the archiving engine
1179 or list/extract engine. If the find expression evaluated as
1180 TRUE, then the related file is selected for processing, other‐
1181 wise it is omited.
1182
1183 In order to make the evaluation of the find expression more con‐
1184 venient, star implements additional find primaries that have
1185 side effects on the file meta data. Star implements the follow‐
1186 ing additional find primaries:
1187
1188 -chgrp gname
1189 The primary always evaluates as true; it sets the group
1190 of the file to gname.
1191
1192 -chmod mode
1193 The primary always evaluates as true; it sets the permis‐
1194 sions of the file to mode. Octal and symbolic permis‐
1195 sions are accepted for mode as with chmod(1).
1196
1197 -chown uname
1198 The primary always evaluates as true; it sets the owner
1199 of the file to uname.
1200
1201 -false The primary always evaluates as false; it allows to make
1202 the result of the full expression different from the
1203 result of a part of the expression.
1204
1205 -true The primary always evaluates as true; it allows to make
1206 the result of the full expression different from the
1207 result of a part of the expression.
1208
1209 The command line:
1210
1211 star -c f=o.tar -find . ( -type d -ls -o false ) -o ! -type d
1212
1213 lists all directories and archives all non-directories to the
1214 archive o.tar.
1215
1216 The command line:
1217
1218 star -c f=o.tar -find . ( -type d -chown root -o true )
1219
1220 archives all directories so they appear to be owned by root in
1221 the archive, all non-directories are archived as they are in the
1222 file system.
1223
1224 Note that the -ls, -exec and the -ok primary cannot be used if
1225 stdin or stdout has been redirected by the list=- of by the
1226 file=- options.
1227
1228 -force_hole
1229 obsoleted by -force-hole
1230
1231 -force-hole
1232 Try to extract all files with holes. This even works with files
1233 that are created without the -sparse option. Star, in this case
1234 examines the content of the files in the archive and replaces
1235 writes to parts containing binary zeroes with seeks. This option
1236 should be used with extreme care because you sometimes get in
1237 trouble when files get unattended holes. All options that start
1238 with the -f sequence are sensitive to typo problems, see BUGS
1239 section for more information.
1240
1241 -force_remove
1242 obsoleted by -force-remove
1243
1244 -force-remove
1245 Force to remove non writable files on extraction. By default,
1246 star will not overwrite files that are read only. If this
1247 option is in effect, star will silently remove these files to
1248 allow the extraction of a file. All options that start with the
1249 -f sequence are sensitive to typo problems, see BUGS section for
1250 more information.
1251
1252 -force-restore
1253 Force an incremental restore even if the incremental dump is
1254 only a partial dump. See -wtardumps, level= and section INCRE‐
1255 MENTAL BACKUPS for more information.
1256
1257 fs=# Set fifo size to #. See bs= for the possible syntax. The
1258 default size of the fifo is 1 Mbyte on Sun mc68000 systems, 4
1259 Mbytes on non mmap() aware Linux systems and 8 Mbytes on all
1260 other systems. See -fifo option for hints on using the right
1261 fifo size.
1262
1263
1264 fs-name=mount_point
1265 Use mount_point when recording information in /etc/tardumps and
1266 when comparing against information in /etc/tardumps for incre‐
1267 mental backups. This makes sense when backups are made using
1268 file system snapshots and allows /etc/tardumps and the archive
1269 to contain the real name of the file system instead of the tem‐
1270 porary mount point that is used for the snapshot device.
1271
1272
1273 H=headertype
1274 See artype=headertype option. Note that POSIX.1-2001 defines an
1275 option -H that follows symbolic links that have been encountered
1276 on the command line. For this reason, the old star option
1277 H=headertype option may go away in the future even though this
1278 option has been in use by cpio since 1989.
1279
1280 -h, -L Follow symbolic links as if they were files. Normally star will
1281 not follow symbolic links but stores their values in tarfile.
1282 See also the -L option.
1283
1284 -hardlinks
1285 In extract mode, this option tells star to try to create a
1286 hardlink whenever a symlink is encountered in the archive. In
1287 create mode, this option tells star to try to archive a hardlink
1288 whenever a symlink is encountered in the file system.
1289
1290 -hpdev Allow 24 bits for the minor device number using 8 octal digits.
1291 Note that although it allows to create tar archives that can be
1292 read with HP-UX tar, this creates tar archives which violate
1293 POSIX.1-1988. This option is only needed if you like to use a
1294 POSIX.1-1988 based archive format that does not include exten‐
1295 sions. If you use the xstar format, star will use a base 256
1296 extension that allows bigger major/minor numbers by default, if
1297 you use the xustar or the exustar format there is no limitation
1298 at all as these formats use POSIX.1-2001 extended headers to ar‐
1299 chive the major/minor numbers by default.
1300
1301 -i Ignore checksum errors on tar headers. If this option is speci‐
1302 fied, star will not exit if a header with a bad checksum is
1303 found but search for the next valid header.
1304
1305 -install
1306 Carefully replace existing files when extracting files. This is
1307 done similar to install(1) by first extracting the files into a
1308 temporary name and renaming the file to the final name after the
1309 extraction of that file was successful.
1310
1311 As star by default does not remove non-empty directories, an
1312 install that needs to remove existing non-empty directories may
1313 also need the options -force-remove and -remove-recursive.
1314
1315 -j run the input or output through a bzip2 pipe - see option -z -Z
1316 and -bz below. As the -bz the -j the -Z and the -z option are
1317 non standard, it makes sense to omit the -bz the -j the -Z and
1318 the -z options inside shell scripts if you are going to extract
1319 a compressed archive that is located inside a plain file as star
1320 will auto detect compression and choose the right decompression
1321 option to extract.
1322
1323 -keep-nonempty-dirs
1324 Do not complain about trying to remove nonempty directories in
1325 case that -remove-recursive has not been specified.
1326
1327 -keep_old_files
1328 obsoleted by -keep-old-files
1329
1330 -keep-old-files, -k
1331 Keep existing files rather than restoring them from tarfile.
1332 This saves files from being clobbered even if tarfile contains a
1333 more recent version of the corresponding file.
1334
1335 See SECURITY NOTES for more information.
1336
1337 -L, -h Follow symbolic links as if they were files. Normally star will
1338 not follow symbolic links but stores their values in tarfile.
1339 See also the -h option.
1340
1341 -l Do not print a warning message if not all links to hard linked
1342 files could be dumped. This option is evaluated in the opposite
1343 way to historic tar(1) implementations and to POSIX.1. POSIX.1
1344 requests that by default no warning messages will be printed and
1345 -l will enable warning messages when not all links could be
1346 archived.
1347
1348 level=dumplevel
1349 Set level for incremental dumps. This option is used to switch
1350 star into true incremental dump mode. The dumplevel may be in
1351 the range between 0..99.
1352
1353 In true incremental dump mode, a -C option which is followed by
1354 the name a mount point and a dot ('.') as starting directory
1355 name is required. Only a single file system may be handled at a
1356 time. If the directory following the -C option is not referring
1357 to a root directory of a file system, the dump is called a par‐
1358 tial dump. If the directory following the -C option is refer‐
1359 ring to a root directory of a file system and no other restric‐
1360 tions apply that exclude certain files from the dump, the dump
1361 is called a full dump.
1362
1363 By default, the tardumps database is not written. See also the
1364 tardumps=name and -wtardumps options and the section INCREMENTAL
1365 BACKUPS for more information.
1366
1367 -link-data
1368 In create mode, include the data for files even if these files
1369 are hard links. This feature in create mode is currently only
1370 available for the exustar archive format and only in case
1371 -sparse has not been specified.
1372
1373 In extract mode, allow star to deal with data in hard linked
1374 files even if the standard would not allow this for the used ar‐
1375 chive format.
1376
1377 -link-dirs
1378 When in create mode, try to find hard linked directories. Using
1379 -link-dirs will force star to keep track of all directories that
1380 will go into the archive and thus causes a lot more memory to be
1381 allocated than in the default case.
1382
1383 If you like to extract a cpio archive that contains hard linked
1384 directories, you also need to specify -link-dirs in extract or
1385 diff mode. This is needed because many cpio implementations
1386 create buggy archives with respect to hard links. If star would
1387 look for hard linked directories in all cases, it would detect
1388 many pseudo hard links to directories. Use -link-dirs with care
1389 if you extract cpio archives.
1390
1391 Note that not all filesystem allow to create hard links to
1392 directories. Also note that even though a non-root user is able
1393 detect and archive hard linked directories, all known operating
1394 systems require the extraction to be done as root in order to be
1395 able to create or remove hard links to directories. For this
1396 reason its only recommended to use this option when doing accu‐
1397 rate backups and when hard links to directories are expected.
1398
1399 When the option -link-dirs is not used and hard links to direc‐
1400 tories are present, the appendant sub-tree will appear more than
1401 once on the archive and star will print Linkcount below zero
1402 warnings for non directory hard links inside the sub-tree.
1403
1404 list=filename
1405 Read filenames for store/create/list/diff command from filename.
1406 The file filename must contain a list of path names, each on a
1407 separate line. This option implies the -D option. To force
1408 star to descend directories, use the -dodesc option in this
1409 case. See also the -X option.
1410
1411 Note that if list=- has been specified, it is no longer possible
1412 to use the -find -exec primary.
1413
1414 -lowmem
1415 Try to run with reduced memory requirements. This causes star
1416 to default to 1 MB of FIFO memory. Instead of allocating memory
1417 to hold the directory content and reading the directory at once,
1418 star reads the directory name by name. This may cause star to
1419 close the directory if it rans out of file descriptors because
1420 of deeply nested directories. If a directory then does not sup‐
1421 port telldir(3)/seekdir(3), star will fail.
1422
1423 -lzo run the input or output through a lzop pipe - see option -z
1424 below.
1425
1426 -M, -xdev
1427 Do not descend mount points. This is useful when doing backups
1428 of complete file systems. See NOTES for more information.
1429
1430 -m Do not restore access and modification time. (Access time is
1431 only available if star is reading star, xstar, xustar, exustar,
1432 or pax archives). If star extracts other archive types, the -m
1433 flag only refers to the modification time.
1434
1435
1436 -match-tree
1437 If in create mode a pattern does not match a directory, and
1438 -match-tree has been specified, the whole directory tree is
1439 excluded from the archive and from further directory scans. By
1440 default, star excludes the directory but still recursively scans
1441 the content of this directory as complex patterns could allow
1442 files inside the directory tree to match. Using -match-tree
1443 allows to efficiently exclude whole trees from scanning. This
1444 helps to avoid scannings directory trees that are on remote file
1445 systems or contain excessive bad blocks.
1446
1447 maxsize=#
1448 Do not store files in tarfile if they are bigger than #. See
1449 bs= for the possible syntax. By default, the number is multi‐
1450 plied by 1024, so the value counts in units of kBytes. If the
1451 size specifier ends with a valid multiplication character (e.g
1452 '.' for bytes or 'M' for MB) the specified size is used as spec‐
1453 ified and not multiplied by 1024. See bs= option for all possi‐
1454 ble multipliers.
1455
1456 -meta In create mode, -meta causes star to archive all meta data of
1457 the file (e.g. uid, permissions, ...) but not the file content.
1458 In extract mode, it causes star to restore all meta data but not
1459 the file content. In addition, in extract mode no plain file,
1460 special file or directory will be created. Meta files are
1461 needed to support incremental backups.
1462
1463 Warning: Do not try to extract star archives containing meta
1464 files using other tar implementations if they are not aware of
1465 the meta file extensions of star. Star tries to force all tar
1466 implementations that are not standard compliant to abort. Star
1467 also tries to make all non POSIX.1-2001 compliant tar implemen‐
1468 tations unable to find a valid filename. However when other
1469 POSIX.1-2001 aware tar implementations come up and don't know
1470 about meta files, they will destroy files on disk.
1471
1472 The problems result from the only current fallback in the POSIX
1473 standard that tells tar implementations to treat all unknown
1474 file types as if they were plain files. As meta files are needed
1475 for incremental backups, I am looking for people and companies
1476 who like to support me to be able to add the meta file concept
1477 to the POSIX.1-2005 standard.
1478
1479 -modebits
1480 This options allows you to create tar archives that include more
1481 than 12 bits from st_mode. Note this create tar archives that
1482 violate POSIX but some tar implementations insist in reading
1483 such nonstandard archives.
1484
1485 -multivol
1486 Switch to multi volume mode. In multi volume mode, there will
1487 be no logical EOF marker written to the end of a single tape. If
1488 -multivol is used in read mode, a hard EOF on input (if not pre‐
1489 ceded by a logical EOF) triggers a medium change operation.
1490
1491 Specifying -multivol tells star to split files across volumes if
1492 needed. This way, a virtual archive is created that spans more
1493 than one medium. Multi volume mode is needed whenever it is not
1494 possible to split the archiving or extracting into several logi‐
1495 cally independent tasks. This is true for e.g. incremental
1496 dump/restore operations where inode numbers need to be traced
1497 for the whole task.
1498
1499 When tsize=# has been specified, but star is not in multi volume
1500 mode, files cannot be split across volumes.
1501
1502 When -multivol has been specified in create mode together with
1503 tsize=# then a media change is initiated exactly after an amount
1504 of tsize data has been written. When -multivol has been speci‐
1505 fied in create mode and tsize=# has not been specified, then the
1506 medium change is triggered by a EOT condition from writing the
1507 medium. This allows to use media where the size cannot be known
1508 in advance (e.g. tapes with build in compression); it does not
1509 work if the EOT condition is not returned in sync with the
1510 related write operation. For this reason, it is expected that
1511 data buffering inside a device driver cannot be used.
1512
1513 Depending on the selected archive format, star writes a volume
1514 header at the beginning of a new medium. This medium header
1515 allows to verify the correct volume after a change during read
1516 back. It is recommended to use the exustar format for best
1517 results. In create mode, -multivol is only supported for ar‐
1518 chives types that allow to write reliable multi volume header
1519 information.
1520
1521 See tsize=# option for more information.
1522
1523 Note that -multivol is an interactive option that prevents star
1524 from being used in non-interactive environments. If you like to
1525 use it in a non-interactive environment, you need to specify
1526 new-volume-script=script in addition in order to automate the
1527 media change procedure.
1528
1529 newer=filename
1530 Do not store files to tarfile if their modification time is not
1531 newer than the modification time of filename. See -ctime option
1532 for changing this behavior.
1533
1534 -newest
1535 In conjunction with the list command this lists you only the
1536 newest file in tarfile.
1537
1538 -newest_file
1539 obsoleted by -newest-file
1540
1541 -newest-file
1542 In conjunction with the list command this lists you only the
1543 newest regular file in tarfile.
1544
1545 new-volume-script=script
1546 Call script at end of each tape if in multi volume mode. If
1547 this option is not in effect, star will ask the user to confirm
1548 the volume change. The script is called with two parameters.
1549 The first parameter is the next volume number and the second
1550 parameter is the next archive file name.
1551
1552 -nodump
1553 If this option is set, star will not dump files that have the
1554 nodump flag set. Note that this currently only works on BSD-4.4
1555 derivates and on Linux. On Linux, using this option will cause
1556 a performance degradation (the system time increases by 10%)
1557 because of the unlucky kernel interface.
1558
1559 -no-dirslash
1560 Do not add a slash to the end of directory names if writing to
1561 an archive. Historic tar archive formats did only allow to
1562 specify plain files and hard links. Around 1980, BSD added a
1563 feature to specify a directory on tape by adding a slash to the
1564 end of the name. POSIX.1-1988 defined the first official tar ar‐
1565 chive format that had a clean method to specify the type of a
1566 directory. As old tar formats need the slash to recognize a
1567 directory, -no-dirslash may not be used if archives should be
1568 compatible with the old tar format.
1569
1570 -no_fifo
1571 obsoleted by -no-fifo
1572
1573 -no-fifo
1574 Don't use a fifo to optimize data flow from/to tarfile. Cur‐
1575 rently the -fifo option is used as default. (This may be changed
1576 at compile time.)
1577
1578 -no-fsync
1579 Do not call fsync(2) for each file that has been extracted from
1580 the archive. Using -no-fsync may speed up extraction on operat‐
1581 ing systems with slow file I/O (such as Linux), but includes the
1582 risk that star may not be able to detect extraction problems
1583 that occur after the call to close(2). A typical cause for such
1584 problems is a NFS file system that fills up before the buffer
1585 cache is synced or a write error that occurs while the buffer
1586 cache is synced. There may be other reasons. Use with extreme
1587 care.
1588
1589 -nochown, -o
1590 Do not restore owner and group of files. This may be used if
1591 super user privileges are needed to overwrite existing files but
1592 the local ownership of the existing files should not change.
1593
1594 -no-p Do not restore files and directories to their original permis‐
1595 sions. This option is needed only if star is called by the
1596 super user and the permissions should not be restored from the
1597 archive. See also the -p option. The -p options has a higher
1598 precedence than the -no-p option.
1599
1600 -no_statistics
1601 obsoleted by -no-statistics
1602
1603 -no-statistics
1604 Do not print statistic messages at the end of a star run.
1605
1606 -no-xheader
1607 Do not create or extract POSIX.1-2001 extended headers. This
1608 option may be used if you like to read an archive with broken
1609 extended headers.
1610
1611 -not, -V
1612 Invert the meaning of the pattern list. i.e. use those files
1613 which do not match any of the pattern. Note that this option
1614 only applies to patterns that have been specified via the pat‐
1615 tern=pattern or pat=pattern option. Patterns specified as file
1616 type arguments will not be affected.
1617
1618 -notarg, -pax-c
1619 Match all file or archive members except those specified by the
1620 pattern or file operands.
1621
1622 -nowarn
1623 Do not print warning messages. This sometimes is useful to make
1624 the output more readable (e.g. when hundreds of files that are
1625 going to be extracted are not newer in the archive then on the
1626 filesystem).
1627
1628 -numeric
1629 Use the numeric user/group fields in the listing rather than the
1630 default. The default allows to list the ASCII version of
1631 user/group of the file and to extract the owners of the files
1632 based on numeric values rather than the names. In create mode,
1633 no user/groups names are put on the archive. The -numeric
1634 option also applies when ACLs are going to be archived or
1635 extracted.
1636
1637 -O Be compatible to old versions of tar. If star is invoked with
1638 this option, star generates archives which are fully compatible
1639 with old UNIX tar archives. If in extract mode, star ignores any
1640 additional info in the headers. This implies neither that ar‐
1641 chives generated with this option are binary equal with archives
1642 generated by old tar versions nor that star is trying to compre‐
1643 hend all bugs that are found in old tar versions. The bug in
1644 old tar versions that cause a reversal of a space and a NULL
1645 byte in the checksum field is not repeated. If you want to have
1646 signed checksums you have to specify the -singed-checksum option
1647 too. If you want directories not to be archived in order to be
1648 compatible to very old historic tar archives, you need to spec‐
1649 ify the -d option too.
1650
1651 This option is superseeded by the H=headertype option.
1652
1653 -o, -nochown
1654 Do not restore owner and group of files. This may be used if
1655 super user privileges are needed to overwrite existing files but
1656 the local ownership of the existing files should not change.
1657
1658 -onull, -nullout
1659 Do not actually write to the archive but compute and add the
1660 sizes. This is useful when trying to figure out if a tape may
1661 hold the current backup. Please only use the -onull option as
1662 it is a similar option as used by the sdd(1) command.
1663
1664 -P Allow star to write a partial record as the last record. Nor‐
1665 mally, star writes each record with the same size. This option
1666 is useful on unblocked tapes i.e. cartridge tapes like QIC tapes
1667 as well as with archives that are located in files. If you use
1668 this option on local files, the size of the archive will be
1669 smaller. If you use this option on cartridge tapes, is makes
1670 sure that later - in extract mode - star will read up to the end
1671 of file marker on the tape and the next call to star will read
1672 from the next archive on the same tape.
1673
1674 -p Restore files and directories to their original permissions.
1675 Without this option, they are created using the permissions in
1676 the archive and the present umask(2). If star is called by the
1677 super user, star behaves as if it has been called with the -p
1678 option. See also -no-p option. If the archive contains Access
1679 Control Lists (ACLs) in POSIX.1-2001 extended headers, star will
1680 restore the access control lists from the archive for files if
1681 the -acl option is specified. If the option -acl has not been
1682 specified, ACLs are not restored at all.
1683
1684 pattern=pattern, pat=pattern
1685 Set matching pattern to pattern. A maximum of 100 pattern=pat
1686 options may be specified. As each pattern is unlimited in
1687 length, this is no real limitation. If more than one pattern is
1688 specified, a file matches if any of the specified pattern
1689 matches. Patterns may be used in create mode to select or
1690 exclude files from the list of file type arguments or the files
1691 located in a sub tree of a file type argument directory. By
1692 default, star scans the whole directory tree underneath a direc‐
1693 tory that is in the argument list. This may be modified by using
1694 the -match-tree option. In extract or list mode, all file type
1695 arguments are interpreted to be select pattern and all option
1696 type patterns may be either select or exclude patterns depending
1697 on the presence or absence of the -not option. If you use file
1698 type select patterns, they work exactly like the method used by
1699 other (non pattern aware) tar(1) implementations. File type
1700 select patterns do not offer pattern matching but allow to
1701 restore subtrees. To extract a complete sub tree from the
1702 directory dir with star using the pattern= option, use pattern=
1703 dir/\* if you like to select a subtree by using the historic
1704 method, use dir as file type argument. If you only like to
1705 extract the directory itself, use dir/ as file type argument.
1706 See manual page for match(1) for more details of the pattern
1707 matcher. All patterns are selection patterns by default. To
1708 make them exclude patterns, use the -not or the -V option.
1709
1710 pkglist=file
1711 This is (for now) an internal interface for the Schily Source
1712 Package System (sps). It only works in create mode and behaves
1713 similar to the list= option, but it allows to overwrite the per‐
1714 missions, the uid and gid values from the content of the
1715 pkglist= file. Each line from the pkglist= file contains a file
1716 name followed by the permission, a user name and a group name.
1717 The permission is an octal character string. Each value that is
1718 not used to overwrite the original values may be replaced by a
1719 '?'. The fields are separated by spaces, so the pkglist= option
1720 does not allow files that contain newline or space characters.
1721
1722 -pax-c, -notarg
1723 Match all file or archive members except those specified by the
1724 pattern or file operands.
1725
1726 -pax-H Follow symbolic links that have been encountered on the command
1727 line. If the referenced file does not exist, the file informa‐
1728 tion and type will be for the link itself. If the link is ref‐
1729 erencing a file type that cannot be archived with the current
1730 archive format, the file information and type will be for the
1731 link itself.
1732
1733 -pax-i Do interactive renaming in a way that has been defined for POSIX
1734 pax. Star will print the original filename and prompt for a
1735 reply. If you type just RETURN, than the file is skipped. If
1736 you type '.', then the original file name is retained. If you
1737 type anything else, then this is taken as the new file name.
1738
1739 Note that -pax-i is an interactive option that prevents star
1740 from being used in non-interactive environments.
1741
1742 -pax-L Follow symbolic links. If the referenced file does not exist,
1743 the file information and type will be for the link itself. If
1744 the link is referencing a file type that cannot be archived with
1745 the current archive format, the file information and type will
1746 be for the link itself.
1747
1748 -pax-ls
1749 Switch listing format to the format defined for POSIX pax and
1750 ls.
1751
1752 -pax-match
1753 Allow file type arguments to be recognised as regular expres‐
1754 sions in a way that has been defined for POSIX pax.
1755
1756 -pax-n Allow each pattern to match only once. If a pattern matches a
1757 directors, then the whole sub tree matches the pattern.
1758
1759 -pax-p string
1760 PAX style privileges string. Several characters (each has its
1761 own meaning). The following characters are defined:
1762
1763 a Do not preserve file access times. This option is cur‐
1764 rently ignored.
1765
1766 e Preserve the user ID, group ID, file mode bits. This is
1767 equivalent to calling star -p -acl -xfflags.
1768
1769 m Do not preserve file modification times. This is cur‐
1770 rently equivalent to calling star -m.
1771
1772 o Preserve the user ID and group ID. This is the default
1773 for star if called as root.
1774
1775 p Preserve the file mode bits. This is equivalent to call‐
1776 ing star -p.
1777
1778 -prinodes
1779 Print inode numbers in verbose list mode if the archive contains
1780 inode numbers.
1781
1782 -print-artype
1783 Check the type of the archive, print the archive and compression
1784 type on a single line and exit.
1785
1786 -qic24 Set tape volume size to 61440 kBytes. See tsize=# option for
1787 more information.
1788
1789 -qic120
1790 Set tape volume size to 128000 kBytes. See tsize=# option for
1791 more information.
1792
1793 -qic150
1794 Set tape volume size to 153600 kBytes. See tsize=# option for
1795 more information.
1796
1797 -qic250
1798 Set tape volume size to 256000 kBytes. See tsize=# option for
1799 more information.
1800
1801 -qic525
1802 Set tape volume size to 512500 kBytes. See tsize=# option for
1803 more information.
1804
1805 -read0 Read null terminated file names from the file specified with the
1806 list= option.
1807
1808 -refresh_old_files
1809 obsoleted by -refresh-old-files
1810
1811 -refresh-old-files
1812
1813 -refresh
1814 Do not create new files. Only already existing files may be
1815 overwritten from tarfile if either newer versions are present in
1816 the archive or if the -U flag is used. This allows to overwrite
1817 files by more recent files from an archive that contains more
1818 files than the target directory should contain. The option
1819 -refresh-old-files is the same as the -refresh option.
1820
1821 -remove_first
1822 obsoleted by -remove-first
1823
1824 -remove-first
1825 Remove files before extraction. If this option is in effect,
1826 star will remove files before extracting a file from the ar‐
1827 chive. This is needed if you want to change the file type or if
1828 you need to break a hard link. If you do not use either
1829 -ask-remove or -force-remove together with -remove-first, this
1830 option is useless and no files will be removed.
1831
1832 -remove_recursive
1833 obsoleted by -remove-recursive
1834
1835 -remove-recursive
1836 Remove files recursive. If removing of a file is permitted,
1837 star will only remove files, specials and empty directories. If
1838 this option is in effect, star will be allowed to recursively
1839 removes non empty directories too.
1840
1841 -restore
1842 switches star into true incremental restore mode. A file named
1843 star-symtable and a directory named star-tmpdir is created in
1844 the root directory of the file system where the extraction takes
1845 place. If -restore has been specified, star behaves as if -xdot
1846 has been specified too. See also level= option and section
1847 INCREMENTAL BACKUPS for more information.
1848
1849 Note: Do not use the -restore option if you only like to restore
1850 a single file or a list of selected files.
1851
1852 -S Do not store/create special files. A special files is any file
1853 except plain files, symbolic links and directories. You need to
1854 be super user to extract special files.
1855
1856 -s replstr
1857 Modify file or archive member names named by a pattern according
1858 to the substitution expression replstr. The format of replstr
1859 is:
1860
1861 -s /old/new/[gp]
1862
1863 The old pattern may use regular expressions and the new string
1864 may contain the special character '&'. The character '&' is sub‐
1865 stituted by the string that matches the old pattern. The
1866 optional trailing 'g' means global substitution. If 'g' is not
1867 used, a substitution pattern is only used once on a name. If
1868 the optional trailing 'p' is used, the substitution is printed
1869 to standard error.
1870
1871 Up to 100 substitute options may be used. If more than one sub‐
1872 stitute option has been specified, star will loop over all sub‐
1873 stitute patterns until one matches.
1874
1875 If the name substitutes to the empty string, the file is
1876 skipped.
1877
1878 -secure-links
1879 Do not extract hard links or symbolic links if the link name
1880 (the target of the link) starts with a slash (/) or if /../ is
1881 contained in the link name. Tar archives containing such links
1882 could be used to compromise the system. If they are unpacked
1883 together with a lot of other files, this may not even be
1884 noticed.
1885
1886 As the usability of a tar archiver would be limited if
1887 -secure-links checking would be done by default, star makes link
1888 checking optional.
1889
1890 If you unpacked a tar archive using the -secure-links and did
1891 not get a security warning at the end of the star run, all files
1892 and links have been extracted. If you get a warning, you should
1893 unpack the archive a second time and specify the options -k, -w
1894 and -nowarn in addition to the options used for the first run.
1895 See SECURITY NOTES for more information.
1896
1897 -shm Use System V shared memory for fifo. Normally star is compiled
1898 to use mapped /dev/zero pages for the fifo, if the operating
1899 system supports this. If star is compiled to have both code for
1900 mapped pages and for System V shared memory, star will use
1901 shared memory instead of the default. If the -help menu doesn't
1902 show the -shm flag you have no choice. When using System V
1903 shared memory, you may have to raise the system's internal limit
1904 for shared memory resources to get enough shared memory for
1905 star.
1906
1907 -signed_checksum
1908 obsoleted by -signed-checksum
1909
1910 -signed-checksum
1911 Use signed chars to calculate checksums. This violates the tar
1912 specs but old versions of tar derived from the seventh edition
1913 of UNIX are implemented in this way. Note: Only filenames and
1914 linknames containing chars with the most significant bit set may
1915 trigger this problem because all other fields only contain 7 bit
1916 ASCII characters, octal digits or binary zeroes.
1917
1918 -silent
1919 Suppress informational messages like foobar is sparse.
1920
1921 -sparse
1922 Handle files with holes effectively on store/create. Note that
1923 sparse files may not be archived this way if the archive format
1924 is tar, ustar, suntar, pax, or any cpio variant. On Solaris-2.3
1925 ... Solaris-2.5.1 there is a special ioctl() called _FIOAI that
1926 allows root to get the allocation info more efficiently. On
1927 Solaris 11 there is an enhanced lseek(2) call with addidional
1928 whence values SEEK_HOLE and SEEK_DATA that allow to find holes
1929 in an efficient way. Other operating systems lack support to
1930 get the real allocation list and force star to scan the files to
1931 look for blocks that only contain null characters. This may
1932 star cause to assume more holes to be present than the number
1933 that the file really contains.
1934
1935 -symlinks
1936 This option tells star in extract mode to try to create a sym‐
1937 link whenever a hardlink is encountered in the archive.
1938
1939 -T If the option file= or f= is omitted and the -T option is
1940 present, star will use the device indicated by the TAPE environ‐
1941 ment variable, if set.
1942
1943 tardumps=name
1944 Set the file name for tar dump dates database to name. The
1945 default name is /etc/tardumps. Use in combination with the
1946 level= option to create true incremental dumps. See also -wtar‐
1947 dumps option and section INCREMENTAL BACKUPS for more informa‐
1948 tion.
1949
1950 -time Print timing info. See DIAGNOSTICS for more information.
1951
1952 -to_stdout
1953 obsoleted by -to-stdout
1954
1955 -to-stdout
1956 Extract files to stdout. This option may be used to extract
1957 tarfiles containing tarfiles (see examples below).
1958
1959 -tpath Use this option together with the -t option or with -cv (verbose
1960 create) to get only a list of the pathnames of the files in the
1961 archive. This may be used in shell scripts to generate a name
1962 list. If used together with the -diff option, star will only
1963 print the names of the files that differ. A second run of star
1964 may then be used to restore all files that had differences to
1965 the archive. Use the list= option to specify the namelist in
1966 this case.
1967
1968 tsize=#
1969 Set tape volume size to # to enable multi volume tape support.
1970 The value refers to the archive size without compression. See
1971 bs= for the possible syntax. By default, the number is multi‐
1972 plied by 512, so the value counts in units of 512 byte blocks.
1973 If the size specifier ends with a valid multiplication character
1974 (e.g '.' for bytes or 'M' for MB) the specified size is used as
1975 specified and not multiplied by 512. With this option in
1976 effect, star is able to archive filesystems that are bigger then
1977 the tape size. If the option tsize=# without -multivol then no
1978 file will be split across volumes and each volume may in theory
1979 be read back separately. Files that do not fit on a single tape
1980 may not be stored in this mode. If -multivol has been specified
1981 in addition, star will split files when the maximum allowed tape
1982 size has been reached. If the tape volume size is not a multi‐
1983 ple of the tape block size, the tape volume size is silently
1984 rounded down to a value that is a multiple of the tape block
1985 size.
1986
1987 See -multivol option for more information.
1988
1989 -U Restore files unconditionally. By default, an older file from
1990 the archive will not replace a corresponding newer file on disk.
1991
1992 umask=mask
1993 Set star's umask to mask. This allows to control the permis‐
1994 sions for intermediate directories that are created by star in
1995 extract mode. See also -p option.
1996
1997 -v Increment verbose level by one. This normally results in more
1998 output during operation. See also in the description for the -t
1999 flag. Normally, star does its work silently. If the verbose
2000 level is 2 or more and star is in create or update mode, star
2001 will produce a listing to the format of the ls -l output.
2002
2003 -V, -not
2004 Invert the meaning of the pattern list. i.e. use those files
2005 which do not match any of the pattern. Note that this option
2006 only applies to patterns that have been specified via the pat‐
2007 tern=pattern or pat=pattern option. Patterns specified as file
2008 type arguments will not be affected.
2009
2010 -version
2011 Print version information and exit.
2012
2013 VOLHDR=name
2014 Use name to generate a volume header.
2015
2016 -w Do interactive creation, extraction or renaming. For every file
2017 that matches the list of patterns and that has a more recent
2018 modification time in the tar archive (if in extract mode and the
2019 -U option is not specified) star prints its name and asks:
2020
2021 get/put ? Y(es)/N(o)/C(hange name) :
2022
2023 You may answer either `N' for No or <Return> to skip this file.
2024 If you answer `Y' the file is extracted or archived on tape with
2025 its original name. If you answer `C', you are prompted for a
2026 new name. This name is used for the filename on disk if star is
2027 in extract mode or for the archive name if star is in create
2028 mode.
2029
2030 See SECURITY NOTES for more information.
2031
2032 Note that -w is an interactive option that prevents star from being
2033 used in non-interactive environments.
2034
2035 -wready
2036 This option tells Star to wait up to two minutes for the drive
2037 to become ready. It has been added as a hack for a bug in the
2038 SunOS/Solaris st device driver. This driver has problems to
2039 sense the loading time with Exabyte drives with factory set‐
2040 tings. It also makes sense to use -wready if multiple remote
2041 backups are made. In this case, the remote connection is closed
2042 while the remote tape server is still writing a file mark. If
2043 another remote backup is initiated before the old remote server
2044 did finish to write the file mark, it would be impossible to
2045 open the tape driver unless -wready is specified to tell star to
2046 wait for the drive to become ready again.
2047
2048 -wtardumps
2049 Tell star to update the file that contains the tar dump dates
2050 data base if in dump mode. If the dump is not a full dump, the
2051 tar dump dates data base file is not written. See also tar‐
2052 dumps=name and -C option or INCREMENTAL BACKUPS section for more
2053 information.
2054
2055 -X filename
2056 Use the file filename as a file containing a list of path names
2057 to be excluded from the store/create/list/diff operation. The
2058 file filename must contain a list of path names, each on a sepa‐
2059 rate line. Be careful with white space and note that path names
2060 in the list may not contain new lines. Multiple -X options may
2061 be used. Each argument must refer to a file containing path
2062 names. The -X option has precedence before other options that
2063 select files to be included in the operation. See also list=
2064 option.
2065
2066 -xattr
2067
2068 -xattr-linux
2069 Store and extract extended file attributes as found on Linux
2070 systems. This option only makes sense when creating or extract‐
2071 ing exustar archives as it is based on POSIX.1-2001 extended tar
2072 headers.
2073
2074 The method used in the current implementation could be used to
2075 store and extract extended file attributes from BSD too. Note
2076 that the current implementation is not generic enough to cover
2077 more general extended file attribute implementations as found on
2078 Solaris. If star starts to implement a method that covers
2079 extended file attributes on Solaris, the new method will be used
2080 then -xattr has been specified and -xattr-linux will refer to
2081 the old method. The method used with -xattr-linux may go away
2082 in the future.
2083
2084 xdebug=#, xd=#
2085 Set extended debug level to #.
2086
2087 -xdev, -M
2088 Do not descend mount points. This is useful when doing backups
2089 of complete file systems. See NOTES for more information.
2090
2091 -xdir Extract directories even if the corresponding directories on the
2092 archive are not newer. This is useful when for some reason, the
2093 directories are recorded after their content (see -dirmode
2094 option), or when the permissions of some directories must be set
2095 in any case. As the classical UNIX cpio program does not imple‐
2096 ment delayed directory permission and time stamp setting, cpio
2097 users often create archives in reverse order (directories past
2098 their content). For this reason, it makes sense to use -xdir
2099 while extracting cpio archives.
2100
2101 -xdot Unconditionally extract the first directory in the archive if
2102 the name of this directory is either '.' or './'. This helps to
2103 extract archives in an expected way if the target directory is a
2104 newly created empty directory. As this directory is newer than
2105 the top level directory in the archive, star would usually skip
2106 this directory during extraction. The effect of this directory
2107 is as if -xdir has been specified but is switched off after the
2108 first directory has been found.
2109
2110 -xfflags
2111 Store and extract extended file flags as found on BSD and Linux
2112 systems. This option only makes sense when creating or extract‐
2113 ing exustar archives as it is based on POSIX.1-2001 extended tar
2114 headers. See NOTES section for problems with -xfflags on Linux
2115 systems.
2116
2117 -xmeta Extract meta files as if they were files. Meta files in ar‐
2118 chives are plain files that do not contain any content data in
2119 the archive. They may be created by using the -meta option in
2120 star's create mode. Existing files are not overwritten. In a
2121 file is missing, a zero sized files is created.
2122
2123 -Z run the input or output through a compress pipe - see option -z
2124 below.
2125
2126 -z run the input or output through a gzip pipe. This is currently
2127 a quick and dirty hack, that mainly will cover the most common
2128 usage to compress the tar output if it is a file. No reblocking
2129 will be done, so this option will currently only make sense on
2130 plain files. As the -bz the -j the -Z and the -z option are non
2131 standard, it makes sense to omit the -bz the -j the -Z and the
2132 -z options inside shell scripts if you are going to extract a
2133 compressed archive that is located inside a plain file as star
2134 will auto detect compression and choose the right decompression
2135 option to extract. The environment variable STAR_COMPRESS_FLAG
2136 may be used to specify one option for gzip. If you want to
2137 write write compressed archives to tape, you should use
2138 star -c . | gzip | sdd ibs=4k obs=32k -fill of=/dev/rmt/1bn
2139 or
2140 star -c . | gzip | sdd ibs=4k obs=32k -fill ovsize=60m
2141 of=/dev/rmt/1bn
2142 if the tape can hold 60 MB.
2143
2145 Star is able to back up file system in full and incremental mode. To
2146 allow incremental backups, the file system must implement POSIX seman‐
2147 tics.
2148
2149 To be more verbose:
2150
2151 · The filesystem needs to uniquely identify files by the two num‐
2152 bers st_dev (The device ID of the device containing the file)
2153 and st_ino (The file serial number). If a file is renamed,
2154 these numbers need to be retained. Both numbers need to be a
2155 cardinal scalar that is expressible in a decimal number.
2156
2157 · The filesystem needs to implement at least two time stamps,
2158 st_mtime the file's last modification time and st_ctime the
2159 file's last status change time. Both time stamps need to be
2160 dealt with as documented by the POSIX standard. Both numbers
2161 need to be a cardinal scalar that is expressible in a decimal
2162 number.
2163
2164 · The filesystem needs to allow to rename files and directories by
2165 either calling rename(2), or link(2) and unlink(2).
2166
2167 · The filesystem needs to honor and preserve the case of file
2168 names.
2169
2170 The incremental backup method used by star depends on comparing the
2171 time stamps of all files against the time of the last backup. Note that
2172 this method only works correctly if the level 0 backup and all higher
2173 level incrementals include the whole file system. As star archives all
2174 inode meta data, star is able to detect renamed files by comparing the
2175 inode numbers of all files while in incremental restore mode.
2176
2177 Detecting renamed files only works if star, while in backup mode, scans
2178 the whole file system tree for each full and incremental backup. This
2179 will work in case no files are excluded and the dump starts at the root
2180 directory of a file system. In case that no files are renamed from
2181 excluded parts to included parts, partial backups may be taken also.
2182 Partial backups only make sense if a complete directory sub tree is
2183 excluded (e.g. by using the pat= option) or if a partial backup starts
2184 at a sub directory that is not the root directory of the file system.
2185
2186 To create a level 0 dump call:
2187
2188 star -c -xdev -sparse -acl -link-dirs level=0 -wtardumps \
2189 f=archive-name -C /filestem-mount-point .
2190
2191 To create a level 1 dump call:
2192
2193 star -c -xdev -sparse -acl -link-dirs level=1 -wtardumps \
2194 f=archive-name -C /filestem-mount-point .
2195
2196 Do not forget the dot at the end of the command line that specifies the
2197 directory to start the operation.
2198
2199 Backups from live filesystems should be avoided. On operating systems
2200 that support file system snapshots, backups should be made from a read-
2201 only mount of a snapshot. Be careful that all files that have been cre‐
2202 ated between setting up a snapshot and starting an incremental backup
2203 may be missing from all backups unless the dumpdate=name option is
2204 used.
2205
2206 If the system that is going to be backed up is not acting as a file
2207 server, it makes sense to shut down all services that may result in
2208 inconsistent file states before setting up the filesystem snapshot.
2209 After the filesystem snapshot has been set up, the services may be
2210 restarted.
2211
2212 If the the system that is going to be backed up is acting as a file
2213 server, it may be that services on remote clients cause inconsistent
2214 file states unless all such services that remotely access files are
2215 shut down before the snapshot is set up.
2216
2217 Star includes options that help to deal with file system snapshots.
2218 The following example backs up a file system on Solaris using a file
2219 system snapshot:
2220
2221 echo > /tmp/snapstamp
2222
2223 mount -r `fssnap -F ufs -o \
2224 backing-store=/var/tmp/EXPORT-NFS.snap /export/nfs` /mnt
2225
2226 star -c -xdev -sparse -acl -link-dirs level=0 -wtardumps \
2227 f=archive-name dumpdate=/tmp/snapstamp \
2228 fs-name=/export/nfs -C /mnt .
2229
2230 First a file with a current time stamp is created, then a snapshot for
2231 /export/nfs is created and mounted on /mnt. The following star command
2232 then creates a level 0 backup from the file system using the time the
2233 snapshot was created and the original mount point of the file system
2234 for /etc/tardumps and the archive header.
2235
2236 Note that if the backup is done on a live file system, it may be unre‐
2237 liable. A typical problem problem in this context is caused by growing
2238 log files. As growing files are not a real problem with backups, the
2239 best way of dealing with growing files is to set up a star error con‐
2240 trol file (see errctl= option) and to tell star to ignore growing
2241 files.
2242
2244 Full (level 0) dumps should be made on a regular base (e.g. once a
2245 month). As a full dump may take a long time and takes a lot of tape,
2246 it is wise to make higher level incremental dumps with shorter inter‐
2247 vals. The next table shows a dump level list that may be used if
2248 monthly full dumps take place:
2249
2250 Sun Mon Tue Wed Thu Fri
2251 Week 1: 0 10 10 10 10 5
2252 Week 2: 10 10 10 10 10 5
2253 Week 3: 10 10 10 10 10 5
2254 Week 4: 10 10 10 10 10 5
2255
2256 The level 10 dumps made between Monday and Friday accumulate all
2257 changes made within the week. If you don't like this, use the following
2258 backup schedule:
2259
2260 Sun Mon Tue Wed Thu Fri
2261 Week 1: 0 20 30 40 50 5
2262 Week 2: 10 20 30 40 50 5
2263 Week 3: 10 20 30 40 50 5
2264 Week 4: 10 20 30 40 50 5
2265
2266 Note that in this case, 7 dumps need to be restored if the a crash hap‐
2267 pens at the worst case date (just before the Friday dump in week 2 or
2268 later).
2269
2270
2272 Incremental restores should be made to an empty file system (except for
2273 the lost+found directory). Star is currently unable to perform incre‐
2274 mental restores to a file system that contains active mount points.
2275
2276 The incremental restore procedure starts with restoring the last full
2277 (level 0) dump. Then the latest incremental dump of each dump level
2278 (with ascending order of dump levels) need to be restored.
2279
2280 Let us assume the first example from the section BACKUP SCHEDULES for
2281 the backup schedule. If a disk crash happens before the Thursday dump
2282 of week 3 has been made, the following restore procedure needs to be
2283 applied:
2284
2285 level 0
2286 starting with an empty disk, the full (level 0) dump from week 1
2287 is restored.
2288
2289 level 5
2290 after the level 0 restore has been finished, the level 5 dump
2291 from Friday in week 2 is restored.
2292
2293 level 10
2294 after the level 5 restore has been finished, the level 10 dump
2295 from Wednesday in week 3 is restored.
2296
2297 The disk now contains the same files as it did when the level 10 dump
2298 has been made on Wednesday of week 3.
2299
2300 To extract a level 0 dump call:
2301
2302 cd /filestem-mount-point
2303 star -xpU -restore f=archive-name
2304
2305 This creates the directory star-tmpdir and the database star-symtable
2306 in the root directory of the new file system. Subsequent restores with
2307 higher level backups depend on these files.
2308
2309 To extract a level 1 (or higher) dump call:
2310
2311 cd /filestem-mount-point
2312 star -xpU -restore f=archive-name
2313
2314 Note that the environment variable STAR_DEBUG exists, star does not
2315 remove files with link count 1 that have been removed between incremen‐
2316 tal dumps. These files are moved to the directory star-tmpdir. Before
2317 you start to extract the next incremental, you need to remove all files
2318 in star-tmpdir.
2319
2320
2322 Star may be used to synchronize filesystem content. To do this, an
2323 initial copy of the current content of the source filesystem needs to
2324 be performed first.
2325
2326 To create an initial copy of a filesystem call:
2327
2328 star -c -xdev -sparse -acl -link-dirs level=0 -wtardumps \
2329 -C /filestem-mount-point . | \
2330 star -xpU -restore -C /extract-target-dir
2331
2332 In order to perform subsequent synchronization of the target filesystem
2333 with the content of the source filesystem, a modified incremental
2334 dump/restore procedure may be used.
2335
2336 To copy incremental content of a filesystem call:
2337
2338 star -c -xdev -sparse -acl -link-dirs level=1 -wtardumps \
2339 -cumulative -C /filestem-mount-point . | \
2340 star -xpU -restore -C /extract-target-dir
2341
2342 Note that like with backups in general, copies from a live filesystem
2343 should be avoided. On operating systems that support file system snap‐
2344 shots, copies should be made from a read-only mount of a snapshot. Be
2345 careful that all files that have been created between setting up a
2346 snapshot and starting an incremental copy may be missing from all
2347 copies unless the dumpdate=name option is used.
2348
2349 See section INCREMENTAL BACKUPS to learn how to modify the command line
2350 in case file system snapshots are used.
2351
2353 If star handles a signal, it first prints the statistics. Star handles
2354 the following signals:
2355
2356 SIGINT usually generated by ^C from the controlling tty. Upon
2357 receipt of a SIGINT, star prints statistics and exits. If in
2358 create mode i.e. storing files to archive, star finishes with
2359 the current file to ensure that no partial file is written to
2360 the archive, write an eof record and then exits.
2361
2362 SIGHUP not to be generated from a tty. The actions are the same as
2363 upon receipt of a SIGINT.
2364
2365 SIGQUIT usually generated by ^\ from the controlling tty. Upon
2366 receipt of a SIGQUIT, star prints statistics and continues
2367 with the current operation. This is useful to watch the
2368 progress of the current operation.
2369
2371 The following exit values are returned:
2372
2373 0 All files were processed successfully.
2374
2375 -3 / 253
2376 Star has been called with the option -e, or the errctl= option
2377 has been used to mark the current error fatal.
2378
2379 -2 / 254
2380 One or more files could not be processed successfully.
2381
2382 -1 / 255
2383 Command line parsing error.
2384
2385 >0 Other positive exit codes: The errno of the call that caused the
2386 fatal error.
2387
2389 To get a listing in a way similar to ls -l one might use:
2390
2391 example% star -tv f=/dev/rmt/1bn
2392
2393 The same command as listed above in a POSIX tar command line syntax
2394 compliant way is:
2395
2396 example% star tvf /dev/rmt/1mbn
2397
2398 To copy the directory tree in /home/someuser to the directory /home/fs
2399 use:
2400
2401 example% (cd /home/someuser; star -c .) | (cd /home/fs ; star -xp)
2402
2403 or by using the change directory option of star:
2404
2405 example% star -c -C /home/someuser . | star -xp -C /home/fs
2406
2407 Note that both examples above are not the optimum way to copy a direc‐
2408 tory tree. A more efficient way to copy a directory tree is to use the
2409 -copy option.
2410
2411 example% star -copy -p -xdot -C /home/someuser . /home/fs
2412
2413 To copy a file tree including the Access Control List entries for all
2414 files and to correctly copy sparse (holey) files use:
2415
2416 example% star -copy -p -xdot -acl -sparse -C /home/someuser . /home/fs
2417
2418 To compare the content of a tape to the filesystem one might use:
2419
2420 example% star -diff -v f=/dev/rmt/1bn
2421
2422 To compare two directory trees one might use:
2423
2424 example% star -c . | star -C todir -diff -v diffopts=!times
2425
2426 or better by using a method similar to the -copy method above:
2427
2428 example% star -c -diff -v diffopts=!times -C fromdir . todir
2429
2430 To compare all properties of two file trees, use:
2431
2432 example% star -c -diff -vv -dump -acl -sparse -C fromdir . todir
2433
2434 To extract a backup of the /usr tree without all files residing below
2435 /usr/openwin one might use:
2436
2437 example% star -xp -V pat=openwin/\* f=/dev/rmt/1bn
2438
2439 To extract all .c files to src, all .o files to obj and all other files
2440 to /tmp one might use:
2441
2442 example% star -xp -C src '*.c' -C obj '*.o' -C /tmp '*' f=/dev/rmt/1bn
2443
2444 To extract files from a zipped tar archive that is located on a read
2445 only filesystem e.g. a CD while having the shell's working directory on
2446 the CD one might use:
2447
2448 example% star -zxp -C /tmp f=star-1.1.tar.gz
2449
2450 to extract the files from the tar archive to the /tmp directory.
2451
2452 To backup a list of files generated by the find(1) command:
2453
2454 example% find . find_options -print | star -c list=- f=/dev/rmt/1bn
2455
2456 Note that this does not work if the file names from output of the find
2457 command include new line characters.
2458
2459 To extract a tarfile that contains a tarfile one might use:
2460
2461 example% star -x -to-stdout f=/dev/rmt/1bn pat=pat | star -xp
2462
2463 Pat, in this case should match the tarfile in the tarfile on tape that
2464 should be extracted.
2465
2466 To make a backup of the root filesystem to a tape drive connected to a
2467 remote machine, one might use:
2468
2469 example# cd /
2470 example# star -cM fs=128m bs=63k f=tape@remotehost:/dev/rmt/1bn .
2471
2472 You need a line in /etc/passwd like the following to enable this:
2473
2474 tape:NP:60001:60001:Tape:/etc/tapehome:/opt/schily/sbin/rmt
2475
2476 And a .rhosts file in /etc/tapehome to allow remote connections from
2477 the appropriate hosts. Make sure that the file /etc/default/rmt exists
2478 and allows remote access to the requested tape drive.
2479
2480 To use a ssh(1) connection for a backup to a remote tape server, one
2481 might use:
2482
2483 example# env RSH=/usr/bin/ssh star -cM fs=128m bs=63k
2484 f=tape@remotehost:/dev/rmt/1bn .
2485
2486
2487 To repair a corrupted filesystem for which no recent backup exists, do
2488 the following:
2489
2490 example# fsck -y /filesys
2491 example# mount /filesys
2492 example# cd /filesys
2493 example# star -xpk f=/dev/rmt/1bn
2494 example# mt -f /dev/rmt/1bn rewind
2495 example# star -diff -v diffopts=!times f=/dev/rmt/1bn
2496
2497 Now check the differences and decide whether to restore additional
2498 files. This may be done by generating a list containing the needed
2499 filenames and using the list= option or by using the interactive mode
2500 (see -w option).
2501
2502 If you want a list that only contains all filenames from files with
2503 differences you may use:
2504
2505 example# star -diff -tpath diffopts=!times f=/dev/rmt/1bn
2506
2507 If you are looking for files that changed the type or the access per‐
2508 mission because this is a common case on still corrupted files, use:
2509
2510 example# star -diff -tpath diffopts=type,perm f=/dev/rmt/1bn
2511
2512 If you like to archive all directories only that are part of the direc‐
2513 tory tree under ".", use:
2514
2515 example# star -c f=archive-name -find . -type d
2516
2517 If you like to archive all files as owner root and group root and make
2518 all files world readable in the archive, use:
2519
2520 example# star -c f=archive-name -find . -chown root -chgrp root
2521 -chmod o+r
2522
2523 If you like to list all files in an archive in a way like sfind(1),
2524 instead of the way used by star, use:
2525
2526 example# star -t f=archive-name -find . -ls -false
2527
2528
2530 STAR_COMPRESS_FLAG
2531 If you like star to always create compressed files that use max‐
2532 imum compression, you may set the environment variable STAR_COM‐
2533 PRESS_FLAG to -9.
2534
2535 STAR_DEBUG
2536 If this environment variable is present, star will not remove
2537 temporary files from ./star-tmpdir. The files in this directory
2538 are files that have been removed by users before the last incre‐
2539 mental dump did take place on the master filesystem.
2540
2541 STAR_FIFOSIZE
2542 If you like to by default let star use a different fifo size,
2543 set this environment variable to the desired size.
2544
2545 TAPE Unlike other tar(1) implementations, star defaults to use
2546 stdin/stdout for the archive. If you like star to use the file
2547 name from the TAPE environment instead, you need to specify the
2548 -T option too.
2549
2550 RSH If the RSH environment is present, the remote connection will
2551 not be created via rcmd(3) but by calling the program pointed to
2552 by RSH. Use e.g. RSH=/usr/bin/ssh to create a secure shell
2553 connection.
2554
2555 Note that this forces star to create a pipe to the rsh(1) pro‐
2556 gram and disallows star to directly access the network socket to
2557 the remote server. This makes it impossible to set up perfor‐
2558 mance parameters and slows down the connection compared to a
2559 root initiated rcmd(3) connection.
2560
2561 See BUGS section for more information.
2562
2563 RMT If the RMT environment is present, the remote tape server will
2564 not be the program /etc/rmt but the program pointed to by RMT.
2565 Note that the remote tape server program name will be ignored if
2566 you log in using an account that has been created with a remote
2567 tape server program as login shell.
2568
2570 /etc/default/star
2571 Default values can be set for the following options in
2572 /etc/default/star. For example: CDR_FIFOSIZE=64m
2573
2574 STAR_FIFOSIZE
2575 Sets the default size of the FIFO (see also fs=# option).
2576
2577 STAR_FIFOSIZE_MAX
2578 Sets the maximum size of the FIFO (see also fs=# option).
2579 Setting STAR_FIFOSIZE_MAX in /etc/default/star allows to
2580 overwrite global values from backup scripts for machines
2581 with less memory.
2582
2583 archive0=
2584
2585 archive1=
2586
2587 archive2=
2588
2589 archive3=
2590
2591 archive4=
2592
2593 archive5=
2594
2595 archive6=
2596
2597 archive7=
2598 Archive entries for the -[0..7] option.
2599
2600 A correct archive?= line has 3..4 space separated
2601 entries. The first is the device entry (e.g. ar‐
2602 chive0=/dev/tape). The second is the blocking factor in
2603 512 byte units. The third is the maximum media size in
2604 1024 byte units. If this entry contains a 0, then the
2605 media size is unlimited. The fourth entry is optional.
2606 If it contains a 'n' or a 'N', then the archive device is
2607 not a tape.
2608
2609 Examples:
2610
2611 archive0=/dev/tape 512 0 y
2612 archive1=/dev/fd0 1 1440 n
2613 archive2=/dev/rmt/0mbn 512 0
2614
2615 If the default file does not need to be shared with the
2616 tar program from Solaris, any number may be used like a
2617 generic size option like bs=.
2618
2619 Example:
2620
2621 archive0=/dev/tape 256k 40G y
2622
2623 /etc/tardumps
2624 The default name for the dump level archive. The default name is
2625 used whenever the tardumps=name option has not been specified.
2626 The file is written or updated when -wtardumps is used.
2627
2628 The file holds one or more lines, each specifying a dump level
2629 entry. Each dump level entry starts with a mount point name
2630 followed by a TAB and one or more spaces, followed by the deci‐
2631 mal dump level, a space and the dump time.
2632
2633 If the dump level is directly followed by a 'P', then the dump
2634 refers to a partial dump (a dump that does not include the whole
2635 filesystem).
2636
2637 The dump time itself includes the decimal representation of the
2638 UTC seconds since Jan 01 1970, a space and the textual local
2639 time representation of the dump time.
2640
2641 The numerical decimal dump time representation may be followed
2642 by a dot and a sub second value. The textual local time repre‐
2643 sentation is for informational use by humans only and not evalu‐
2644 ated by star.
2645
2646 ./star-symtable
2647 Contains a database that is needed in incremental restore mode.
2648
2649 ./star-symdump
2650 Contains an intermediate dump of restore database after a fatal
2651 error condition was met during an incremental restore operation.
2652
2653 ./star-tmpdir
2654 Is the temporary directory that is used as intermediate file
2655 storage by star if in incremental restore mode.
2656
2657 ./star-lock
2658 Is a lock file created by star when doing an incremental
2659 restore. If this file is present, it prevents star from running
2660 another incremental restore operation. This helps to avoid more
2661 than one restore operation at a time (e.g. from a cron script).
2662
2663 /dev/tty
2664 Is used for the intercative user interface.
2665
2667 spax(1), tar(1), cpio(1), pax(1), rcp(1), mt(1), rmt(8), match(1),
2668 dd(1), sdd(1), rsh(1), ssh(1), star(4), rcmd(3), fssnap(1m)
2669
2671 star: f records + p bytes (total of x bytes = d.nnk).
2672
2673 The number of full records, the number of bytes in partial records and
2674 the total amount of data in KBytes.
2675
2676 star: Total time x.yyysec (z kBytes/sec)
2677
2678 The time used and the transfer speed from/to the archive.
2679
2680 If there have been non fatal errors during the archive processing, star
2681 will display a delayed error summary before exiting.
2682
2683
2685 The command line syntax for the tar command (as defined in SUSv2 -
2686 UNIX-98) deviates from the command line syntax defined for all other
2687 commands. While the POSIX command line syntax requests all options to
2688 start with a dash (-) and allows to either write options separately or
2689 combined (in case of boolean flags), the tar command line syntax
2690 requires all options to be combined into a single string that does not
2691 start with a dash. Star by default assumes a command line syntax like
2692 a typical POSIX command and includes a compatibility mode that allows
2693 to specify a command line syntax as documented for the UNIX-98 tar com‐
2694 mand. If you believe that you found a bug in the way star parses the
2695 command line, please first check your command line for correctness
2696 before you make a bug report for star.
2697
2698 If you like to write portable shell scripts that call tar, use the
2699 UNIX-98 tar command line syntax (i.e. a single option string and no
2700 dash), choose the commands and options from the following set of char‐
2701 acters ( rxtuc vxfblmo ) and check the shell script with both, your
2702 local tar and star for correct behavior. It you expect the script to
2703 call gnutar, do not include the -o option as gnutar implements this
2704 option in a way that violates UNIX-98.
2705
2706 Star strips leading ./ sequences from pathnames. This lets star in many
2707 cases store longer pathnames than other implementations.
2708
2709 The POSIX.1-1988 method (ustar format) of storing files with pathnames
2710 that are longer than 100 chars has some limitations:
2711
2712 The name field (100 chars) an inserted slash (`/') and the pre‐
2713 fix field (155 chars) produce the pathname of the file. When
2714 recreating the original filename, name and prefix are concate‐
2715 nated, using a slash character in the middle. If a pathname does
2716 not fit in the space provided or may not be split at a slash
2717 character so that the parts will fit into 100 + 155 chars, the
2718 file may not be archived. Linknames longer than 100 chars may
2719 not be archived too.
2720
2721 The star, xstar, xustar, exustar, pax, and gnutar archive formats don't
2722 have these limitations. While gnutar uses a method that makes it impos‐
2723 sible for other tar implementations (except star) to restore filenames
2724 that are longer than 100 chars, the xstar, xustar, exustar and pax ar‐
2725 chive format uses a method that allows an POSIX.1-1988 compliant way of
2726 storing filenames, if the POSIX method would allow this. When the ar‐
2727 chive format is xustar, exustar or pax very long filenames are stored
2728 using extended headers from the POSIX.1-2001 standard.
2729
2730 Some buggy tar implementations will generate incorrect filenames during
2731 a restore operation if the archive contains pathnames or linknames of
2732 exactly 100 chars length.
2733
2734 Star adds a tar signature in the last four bytes of each tar header if
2735 the archive format is star or xstar. This is no problem with the star
2736 archive format as it is an extension of the old pre POSIX.1-1988 tar
2737 format. On the other side, the xstar archive format claims to be as
2738 POSIX.1-1988 compliant as possible. Inserting this tar signature is a
2739 minor deviation from the standard that has the last 12 bytes of each
2740 header reserved for future use. On the other side, tar implementations
2741 such as some pax implementations that only compute checksums on the
2742 first 500 bytes of the header are violating the standard that requests
2743 the checksum to be computed on all 512 bytes of the tar header. All tar
2744 implementations that are 100% Posix compliant will be able to extract
2745 xstar archives as long as no new standard is defined that claims the
2746 last 12 bytes of the header for a different use. But then the ustar
2747 version number should be changed from `00' to `01'. Now, that the
2748 POSIX-2001 standard has been accepted, it is even predictable that all
2749 extensions to the standard tar format will go into the POSIX.1-2001
2750 extended headers which are extensible to include any feature without
2751 future limitation. The only known tar implementation that also uses
2752 the last 12 bytes of the tar header is Sun's tar which uses these 12
2753 bytes for files that are split over several archives. Such archives
2754 created by Sun's tar are not readable by the buggy pax implementation
2755 too. The Sun extension is not incompatible to the star signature
2756 because Sun expects an octal number at the beginning of the 12 byte
2757 field which is a null character in the star case.
2758
2759 Star uses these four bytes since 1985 without problems. If you need a
2760 100% POSIX.1-1988 and 100% POSIX.1-2001 compliant tar archive, you may
2761 use the xustar, exustar or the pax archive format. The probability of
2762 falsely detecting other tar formats as xustar or exustar format however
2763 is higher.
2764
2765 There is no way to ask for the n-th occurrence of a file.
2766
2767 The way EOF is handled by star differs, whether the fifo is in effect
2768 or not. If the fifo is not used, star stops reading the archive if it
2769 encounters a logical EOF record in the archive. If the fifo is used,
2770 star may read until the fifo is full or until the real EOF mark on tape
2771 is reached. How much data star actually reads depends on the time when
2772 the star foreground process sends a fifo shutdown signal to the back‐
2773 ground fifo read process.
2774
2775 Gnu tar often creates tar archives with incorrect logical EOF marks.
2776 The standard requires two blocks that are completely zeroed, whereas
2777 gnutar often only adds one of them.
2778
2779 Old versions of tar found on SYSVr3 and earlier cannot read tar ar‐
2780 chives with a blocksize greater than 10 kBytes.
2781
2782 The method of storing sparse files currently used with the star and
2783 xstar format is not guaranteed to be used in later versions of star.
2784 If the author decides to change this method, later versions of star may
2785 not be able to restore sparse files from tar archives made by the cur‐
2786 rent version of star.
2787
2788 Some tar implementations violate the standard in using only the first
2789 500 Bytes of the header for checksum computation. These tar implementa‐
2790 tions will not accept star and xstar type tar archives.
2791
2792 Sun's Solaris 2.x tar implementation violates the Posix standard. Tar
2793 archives generated by star cause Sun's tar to print tar: impossible
2794 file type messages. You may ignore these messages.
2795
2796 Gnutar's dumpdirs are non standard and are currently not implemented.
2797
2798 If gnutar archives sparse files with more than four holes, it produces
2799 archives that violate the standard in a way that prevents other tar
2800 implementations to read these archives. Star knows about that and is
2801 able to handle these gnutar archives.
2802
2803 The filetype N (LF_NAMES) from gnutar (an obsolete method of storing
2804 long names) will never be implemented.
2805
2806 Note that on operating systems (like DOS) that do not implement real
2807 pipes, star implements compression via a temporary file. Using com‐
2808 pression thus is limited by the maximum file size and the available
2809 disk space.
2810
2811 The extended file flags implementation (see -xfflags option) on Linux
2812 is buggy by design. In order to retrieve the needed information, every
2813 file needs to be opened. If the /dev directory is included in create
2814 mode, every possible driver will be loaded which may hang the system
2815 for a long time. In the worst case, unwanted side effects from opening
2816 devices (such as causing tape drives to rewind the media) may be
2817 caused.
2818
2819
2821 If you unpack a tar archive in a non empty directory, any file in that
2822 directory may be overwritten unless you specify the -k option. If the
2823 archive contains symbolic links or hard links, star may even overwrite
2824 files outside the current directory. If the directory where the ar‐
2825 chive is been unpacked is not empty and contains contains symbolic
2826 links or hard links to directories outside that directory, star may
2827 also overwrite files outside the current directory. As many other com‐
2828 mands, star usually has all possible permissions when run as root.
2829 Unpacking archives as root thus may have fatal results to any file on
2830 your system. Be very careful when you try to extract an archive that
2831 has not been created by you. It is possible to create hand crafted tar
2832 archives that may overwrite critical files (like /etc/passwd) on your
2833 system. In addition all tar archives that have been created with the
2834 list= option and tar archives where the C= option was not specified
2835 before all file type arguments may be critical.
2836
2837 A good advise is to extract all doubtful archives as non root in an
2838 empty directory and to specify the -secure-links option. If you get a
2839 warning, you should unpack the archive a second time and specify the
2840 options -k, -w and -nowarn in addition to the options used for the
2841 first run.
2842
2844 If star is installed suid root, star is able to make connections to
2845 remote archives for non root users. This is done by using the rcmd(3)
2846 interface to get a connection to a rmt(8) server.
2847
2848 Star resets its effective uid back to the real user id immediately
2849 after setting up the remote connection to the rmt server and before
2850 opening any other file.
2851
2852 If star has not been installed suid root and not called by root, it
2853 will try to create the remote connection via rsh(1) or ssh(1) (in case
2854 the environment RSH has been set to ssh). Note that in this case, the
2855 throughput to the remote tape server will be much lower than with a
2856 connection that has been initiated via rcmd(3).
2857
2859 If star is running on a large file aware platform, star is able to han‐
2860 dle files up to 8 GB in a mode that is compliant to the POSIX.1-1988
2861 ustar format. With a nonstandard star specific extension, up to 95 bits
2862 may be used to code the filesize. This will handle files up to
2863 200,000,000 TB. With the new POSIX.1-2001 extended headers used by the
2864 xustar, exustar and pax format, any filesize may be archived.
2865
2867 The fact that the -f option has to be implemented in a way that is com‐
2868 patible with old tar implementations gives several problems. The
2869 options -fifostats, -force-hole, -force-remove and -fifo interfere with
2870 the -f option and the fact that they exist prevents users from using
2871 filenames like e.g. ifo using the traditional way where the filename
2872 directly follows the string -f without any space between the option
2873 name and the file name. However, there is no problem to use a file
2874 named ifo by by calling -f ifo, f=ifo, -f=ifo or -f= ifo. Be careful
2875 not to make typos with the above options. The result could be that a
2876 file is created as a result of the mistyped option.
2877
2878 There is currently no way to set the fifo lowwater and highwater marks.
2879
2880 There is currently no way to automatically delete files in the target
2881 file tree if they are obsolete. Star should implement something simi‐
2882 lar to gnutar's dumpdirs.
2883
2884 If not invoked by the super user star may not be able to extract files
2885 if they reside in read only directories.
2886
2887 Star is not able to make a complete backup of a filesystem if files are
2888 hidden by a mount that is in effect on a directory of this filesystem.
2889 This may be avoided in case of the ufs filesystem if the backup is made
2890 off a ufs snapshot (see the man page for fssnap(1m) It could be avoided
2891 for any filesystem if the loopback filesystem had an option that tells
2892 lofs not to traverse mountpoints.
2893
2894 For now (late 2002), we know that the following programs are broken and
2895 do not implement signal handling correctly:
2896
2897 rsh on SunOS-5.0...SunOS-5.9
2898
2899 ssh from ssh.com
2900
2901 ssh from openssh.org
2902
2903 Sun already did accept a bug report for rsh(1)/[22mssh(1). Openssh.org
2904 accepted and fixed a bug for their implementation of ssh(1).
2905
2906 If you use star to create a remote connection via an unfixed rsh(1) or
2907 ssh(1), be prepared that terminal generated signals may interrupt the
2908 remote connection.
2909
2910
2912 Star was first created in 1982 to extract tapes on a UNIX clone that
2913 had no tar command. In 1985 the first fully functional version has
2914 been released as mtar.
2915
2916 When the old star format extensions have been introduced in 1985, it
2917 was renamed to star (Schily tar). In 1994, Posix 1003.1-1988 exten‐
2918 sions were added and star was renamed to star (Standard tar).
2919
2920
2922 Joerg Schilling
2923 Seestr. 110
2924 D-13353 Berlin
2925 Germany
2926
2927 Mail bugs and suggestions to:
2928
2929 schilling@fokus.fraunhofer.de or js@cs.tu-berlin.de or
2930 joerg@schily.isdn.cs.tu-berlin.de
2931
2932
2933
2934Joerg Schilling 09/06/02 STAR(1)