-if ( @ARGV < 1 ) {
- print(STDERR "usage: $0 [-t] [-h host] [-n dumpNum] [-s shareName]"
- . " [-r pathRemove] [-p pathAdd] [-c compressionLevel]"
- . " files/directories...\n");
+if ( !getopts("te:h:n:p:r:s:c:", \%opts) || @ARGV < 1 ) {
+ print STDERR <<EOF;
+usage: $0 [options] files/directories...
+ Required options:
+ -h host host from which the zip archive is created
+ -n dumpNum dump number from which the tar archive is created
+ A negative number means relative to the end (eg -1
+ means the most recent dump, -2 2nd most recent etc).
+ -s shareName share name from which the zip archive is created
+
+ Other options:
+ -t print summary totals
+ -r pathRemove path prefix that will be replaced with pathAdd
+ -p pathAdd new path prefix
+ -c level compression level (default is 0, no compression)
+ -e charset charset for encoding file names (default: value of
+ \$Conf{ClientCharset} when backup was done)
+EOF