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] [-d] [-l logFile
[--suppressTime] [-m maxFilelen]
[[-n noOfOldFiles] | [--saveLogs]]
[--compressWith compressprog]]
[--storeBackup storeBackup-Params]
[--storeBackupUpdateBackup storeBackupUpdateBackup-Params]
[--storeBackupCheckBackup storeBackupCheckBackup-Params]
[--storeBackupCheckSource storeBackupCheckSource-Params]
[--storeBackupDel storeBackupDel-Params]
[--printAndStop] [-k killTime] [-T tmpdir] [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.10 about the configuration of nfs.
If you have this 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: As 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:
You can set the following options:
$ ls -l /tmp/storebackup.log* -rw------- 1 hjc root 328815 30. Aug 12:12 /tmp/storebackup.log -rw------- 1 root root 1000087 27. Aug 21:18 /tmp/storebackup.log.1 -rw------- 1 root root 1000038 20. Aug 19:02 /tmp/storebackup.log.2 -rw------- 1 root root 1000094 11. Aug 18:51 /tmp/storebackup.log.3 -rw------- 1 root root 1000147 11. Aug 18:49 /tmp/storebackup.log.4 -rw------- 1 root root 1000030 11. Aug 18:49 /tmp/storebackup.log.5
Older log files than *.5 have been deleted automatically.
$TMPDIR. If it does not exist, /tmp is set as
the default value.
# 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!
Heinz-Josef Claes 2014-04-20