Changes

Jump to: navigation, search

stoney backup: Service Software

2,506 bytes added, 07:28, 26 June 2014
/* rsnapshot wrapper bash scripts */
</pre>
== snapshotWrapper.pl ==
As the [[stoney_backup:_Service_Software#snapshot.pl | snapshot.pl]] script needs to be called for each interval sequentially (see [http://www.rsnapshot.org/rsnapshot.html#usage rsnapshot] for more information about rsnapshot execution) a script is needed which does the following logic
* Is today the first day of a month?
** Yes: Is today sunday?
*** Yes: Execute monthly then weekly then daily rsnapshots using the snapshot.pl script (but wait for each interval to finish before starting the next)
*** No: Execute monthly then daily rsnapshots using the snapshot.pl script (but wait for monthly interval to finish before starting the daily)
** No: Is today sunday?
*** Yes: Execute weekly then daily rsnapshots using the snapshot.pl script (but wait for weekly interval to finish before starting the daily)
*** No: Execute daily rsnapshots using the snapshot.pl script
This is all the snapshotWrapper.pl script does. It calls the [[stoney_backup:_Service_Software#snapshot.pl | snapshot.pl]] with the correct intervals for the given day sequentially
* Pod documentation:
<pre>
NAME
snapshot.pl
 
DESCRIPTION
This script ensures that the rsnapshot processes for the different
intervals (daily, weekly and monthly) are running sequentially. To do
so, the script gets todays date and performs some checks:
 
Is today the first day of the month?
Execute the monthly snapshots and wait for this process to finish.
Check if today is sunday, if yes execute the weekly snapshots wait
for the process to finish and finally execute the daily snapshots.
If today is not sunday, only execute the daily snapshots.
 
Is today sunday?
Execute the weekly snapshots and wait for this process to finsh.
Then execute the daily snapshots.
 
If no of the above checks were successful
Simply execute the daily snapshots.
 
The checks are performed in the above mentioned order, if one check is
successful, the following criterias are not checked anymore. That is how
one can ensure that all necessary rsnapshot processes run squentially
 
USAGE
./snapshotWrapper.pl
 
CREATED
2014-06-19 pat.klaey@stepping-stone.ch created
 
VERSION
2014-06-19 pat.klaey@stepping-stone.ch created
 
INCORPORATED CODE
Incorporated code with use:
 
warnings;
strict;
DateTime;
PerlUtil::Logging;
File::Basename;
</pre>
 
'''Note''': This script does not need any configuration.
== rsnapshot wrapper bash scripts ==
There are two rsnapshot wrapper scripts (these are bash scripts), they are installed by the <code>sys-apps/sst-backup-utils</code> package:
486
edits