rocknroll - Rsync fOr baCKup and Roll
rocknroll
Light backup tool based on rsync.
rsync
# rocknroll --init n tag dstdir # initialization # rocknroll [options] tag srcdir dstdir # backup # rocknroll --help # rocknroll --man
rocknroll backups a remote directories tree srcdir in local directory dstdir. Using the link-dest option of rsync, it manages a set of differential archives, named tag.1, tag.2, etc.
srcdir
dstdir
link-dest
tag.1
tag.2
dstdir can contain several set of differential archives. For example, dstdir can contain 2 sets named daily.1 daily.2 daily.3 daily.4 daily.5 daily.6 daily.7 and weekly.1 weekly.2 weekly.3 weekly.4.
daily.1 daily.2 daily.3 daily.4 daily.5 daily.6 daily.7
weekly.1 weekly.2 weekly.3 weekly.4
Before a dstdir can be able to store an archive set, it must be formatted with the --init option.
--init
the name of the archive set.
the topdir to backup, with the format of the srcdir of rsync : [[user@]hostname:]dir
[[user@]hostname:]dir
the local destination directory for the backup.
Almost command line options can be specified as well into the configuration file.
config_file
use an alternate config file.
By default, the config file rocknroll.conf is searched in @/, @/../etc/, /etc/, /etc/rocknroll.d/ (in this order) where @ is the directory containing the rocknroll script.
rocknroll.conf
@/
@/../etc/
/etc/
/etc/rocknroll.d/
@
start again with an existing .tag.running archive (useful after an abort)
.tag.running
debug mode
don't perfom any action, just say what it could be done
print usage
print the manual
don't specify any --link-dest option to rsync(1)
--link-dest
rsync(1)
don't roll the archives set
only update the archive tag.1 (without deletion of any files on it). Don't roll the archives set.
"--opt1 --opt2 --opt3"
rsync option : pass some options to rsync(1) (useful only as command line option)
update archive tag.1 (with deletion of obsolete files). Don't roll up archives set.
Options are also taken from directives specified into rocknroll.conf, a file located in @/, @/../etc/, /etc/, /etc/rocknroll.d/ where @ is the directory contained the rocknroll script.
The format of a line is :
option=value
or
option value
A # starts a comment.
#
Each following directive can be passed as well as an option on the command line.
dir
by default the --link-dest option of rsync(1) is set to the tag.1 directory. This option is to bypass this default.
email
set the email address of the sender for mail alerts
set the email address of the recipient for mail alerts
time_in_second
set the max among of time that a backup can take. Older than this value, a .tag.running temporary directory can be deleted.
path/to/rsync
specify the path of the rsync command line (default /usr/bin/rsync)
/usr/bin/rsync
n,n,n,n...
specify a list of return codes of rsync considered as OK codes. Each code not specified with --rsync_retcode_ok or --rsync_retcode_warn is considered as an error return code.
--rsync_retcode_ok
--rsync_retcode_warn
n,n,n...
specify a list of return codes of rsync considered as warning codes. Each code not specified with --rsync_retcode_ok or --rsync_retcode_warn is considered as an error return code.
"--opt1 --opt2"
pass some options to rsync (useful only in config file). Default is "--hard-links --archive -e ssh".
"--hard-links --archive -e ssh"
0|1
send alert on warning (default is send alert only on error)
smtp_server
set the SMTP server
enable to talk to syslog
This operation is needed before a directory can be used as a backup destination.
n
format a backup directory to receive n archives.
the configuration file
tag
a control file located in the archive directory, related to the tag archive set.
This file stores the number of archives declared at the initialization of the tag archives set. It is useful to recovery a normal state, in case of some archives disappear. Normaly, the number stored in this file must match the number of current archives in the set. If not, a warning is sent. If this file is not found, it is re-create according of the current state of the archive set, and a warning is sent.
the temporary directory (located in the archive directory) for the running rsync.
# rocknroll --init 7 daily /var/backup/myserver # rocknroll --init 4 weekly /var/backup/myserver # rocknroll --init 12 monthly /var/backup/myserver
prepare the directory /var/backup/myserver to receive 3 sets of respectively 7 archives named daily, 4 archives named weekly and 12 archives named monthly.
/var/backup/myserver
daily
weekly
# rocknroll daily myhost.mydomain:/ /var/backup/myserver
perform a new backup of myhost.mydomain:/, add it as daily.1 to the archive set into the local directory /var/backup/myserver, and roll the set daily(forget the existing daily.7)
myhost.mydomain:/
daily.1
daily.7
rsnapshot, <http://rsnapshot.org>. rsnapshot and rocknroll have similar functionalities, and rsnapshot has been the first on the place. But when I began to think about rocknroll, I've never heard of rnspashot.
rsnapshot
rnspashot
Jacquelin Charbonnel, <jacquelin.charbonnel at math.cnrs.fr>
<jacquelin.charbonnel at math.cnrs.fr>
Please report any bugs or feature requests to bug-Dir-Rocknroll at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dir-Rocknroll. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Dir-Rocknroll at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Dir-Rocknroll
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dir-Rocknroll
CPAN Ratings
http://cpanratings.perl.org/d/Dir-Rocknroll
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dir-Rocknroll
Search CPAN
http://search.cpan.org/dist/Dir-Rocknroll
Copyright Jacquelin Charbonnel < jacquelin.charbonnel at math.cnrs.fr >
This software is governed by the CeCILL-C license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-C license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
The fact that you are presently reading this means that you have had knowledge of the CeCILL-C license and that you accept its terms.
To install Dir::Rocknroll, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dir::Rocknroll
CPAN shell
perl -MCPAN -e shell install Dir::Rocknroll
For more information on module installation, please visit the detailed CPAN module installation guide.