next up previous contents
Next: storeBackupCheckBackup.pl Up: Components / Programs to Previous: storeBackupDel.pl   Contents


storeBackupMount.pl

storeBackupMount.pl gives you a ``script'' to mount the needed directories for the backup, start storeBackup.pl and umount the directories. Before trying to mount, it can check via ping if a server is reachable. If these directories are always (or already) mounted, there is no need to use storeBackupMount.pl.

It also can run other programs like storeBackupUpdateBackup.pl or storeBackupDel.pl.

There are different ways to use storeBackupMount.pl:

        storeBackupMount.pl --help
or
        storeBackupMount.pl -g configFile
or
        storeBackupMount.pl -f configFile
or
	storeBackupMount.pl [-s servers] [-l logFile] [-d]
	    [--storeBackup storeBackup-Params]
	    [--storeBackupUpdateBackup storeBackupUpdateBackup-Params]
	    [--storeBackupCheckBackup storeBackupCheckBackup-Params]
	    [--storeBackupCheckSource storeBackupCheckSource-Params]
	    [--storeBackupDel storeBackupDel-Params]
	    [--printAndStop] [-k killTime] [mountPoints...]

You can generate a configuration file (option -g), use a configuration file (option -f) or use it by making your settings via command line.

To be able to mount the directories, you need an entry in /etc/fstab like the following ones:

/dev/sda5		/add		reiserfs	noatime		0 1
lotte:/disk1 /backup nfs rsize=8192,wsize=8192,user,exec,async,noatime 1 1

The first mount point /add is on a local device. In this example, it's the device with a file system to be saved. The second one (/backup) is located on /disk1 on the nfs server lotte. The rest are nfs parameters - see section 7.9 about the configuration of nfs.
If you have these kind of entries in /etc/fstab, you can mount the file systems with:
mount /add
mount /backup
and that's exactly what storeBackupMount.pl does.

There is one major difference in using the command line or the configuration file to set the options to your needs: Because you can define the start of multiple storeBackup related programs, you also have to define the order in which they have to be started. You have to do this:

storeBackupMount.pl will stop execution if a program started by it will not be successful.

You can set the following options:

--help
Print options and stop processing.
--printAndStop
Print a summary of the command line options.
--generate / -g
Specify the name the configuration file to be generated. This option is available on the command line only.
--file / -f
Specify the name of the configuration file to be used. This option is available on the command line only.
--servers / -s / servers
List of servers (name or ip address) to be checked via ping. This option can be repeated multiple times on the command line.
--logFile / -l
Log file for this process, default is stdout.
--debug / -d
Generate some extra messages.
--storeBackup / storeBackup
Define that storeBackup.pl has to be started and specify the options / parameters for it. To be able to map this one parameter to multiples for storeBackup.pl, the quotes on the command line are stripped and you parameter to this option is parsed again.
Example: you set "-f /backup/stbu.conf" on the command line, then storeBackup.pl will be called with the two parameters -f and /backup/stbu.conf.
If you use the configuration file, simply set:
storeBackup = -f /backup/stbu.conf
to get the same result. If this all sounds strange to you, should read chapter configuration file and command line.
--storeBackupUpdateBackup / storeBackupUpdateBackup
Define storeBackupUpdateBackup.pl to be called and set its parameters. See option --storeBackup for details.
--storeBackupCheckBackup / storeBackupCheckBackup
Define storeBackupCheckBackup.pl to be called and set its parameters. See option --storeBackup for details.
--storeBackupCheckSource / storeBackupCheckSource
Define storeBackupCheckSource.pl to be called and set its parameters. See option --storeBackup for details.
--storeBackupDel / storeBackupDel
Define storeBackupDel.pl to be called and set its parameters. See option --storeBackup for details.
--killTime / -k / killTime
Time until any of the started programs will be killed. This means each individual program can run up to killTime. The format of this option is dhms, eg. 10d4h means 10 days and 4 hours. See the keep* options of storeBackup.pl for further examples. The default value is 365 days.
...mountPoints... / mountPoints
On the command line, this is not an option; it is a list parameter. So you have to write on the command line eg.:
# storeBackupMount.pl <all_options> /backupDisk /otherDisk
In the configuration file this is similar to:
mountPoints = /backupDisk /otherDisk
Here you specify the list of mount points needed to perform the backup. This must be a list of paths which have to be defined in /etc/fstab. If you add ro or rw to the beginning of a mount point, you can overwrite that option in /etc/fstab. Example:
ro,/fileSystemToRead
will mount /fileSystemToRead read only, even if the corresponding entry in /etc/fstab is read/write. But only root is allowed to use this feature!


next up previous contents
Next: storeBackupCheckBackup.pl Up: Components / Programs to Previous: storeBackupDel.pl   Contents
Heinz-Josef Claes 2013-05-09