Command line

 

On the command line, you always have a long option and sometimes a shortcut. The long option begins with --, while the short one simply begins with a -. Example:

# storeBackup.pl --file backup.config
# storeBackup.pl -f backup.conf

are equivalent. This also shows an option, which can have exactly one parameter (the file name).

There are other options which can have more than one parameter:

# storeBackup.pl .... -e /proc -e /tmp -e /var/tmp

In this example, option -e (same as --exceptDirs) is used to exclude multiple directories from backup. You can simply repeat the option. It does not matter if you use the long or the short form or a mixture of them.

Now let's look at an option to define the program to uncompress the files in the backup. Let's choose gzip -d, a program with a parameter:

# storeBackup.pl .... --uncompress "gzip -d"

As documented in the description of storeBackup.pl, the parameter of this option is parsed as if it was written in the configuration file (the quoting is stripped by the shell):

uncompress = gzip -d

In this way, storeBackup.pl will see two parameters (gzip and -d) of option --uncompress. The first one is then used as the program and the rest as parameters for it.

Sometimes, you can also use list parameters (parameters without an option). E.g. in storeBackup.pl they are called otherBackupSeries.

Heinz-Josef Claes 2014-04-20