0

my goal is to backup a remote server. However, I first want to get just a local backup working, running on Ubuntu 20.

For this, my /etc/rsnapshot.conf file is the following:

config_version  1.2

snapshot_root   /var/backupsFromRsnapshot/

cmd_rsync       /usr/bin/rsync

# The retain arguments define the number of snapshots to retain at different le>
# I'm going to run cron job beta daily (so below will keep 7 daily snapshots), >
retain  alpha   6
retain  beta    7
retain  gamma   4

# Below defines what folders I want included in the snapshots.
backup  /home/  localhost/
backup  /etc/   localhost/
backup  /var/   localhost/
backup  /usr/local/     localhost/

interval        hourly  6

If I run "rsnapshot configtest", I get the following result:

SYNTAX OK

Then I test the backup with the following command: rsnapshot -t alpha The result is as follows:

mkdir -m 0700 -p /var/backupsFromRsnapshot/ 
mkdir -m 0755 -p /var/backupsFromRsnapshot/alpha.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
    /home/ /var/backupsFromRsnapshot/alpha.0/localhost/ 
mkdir -m 0755 -p /var/backupsFromRsnapshot/alpha.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded /etc/ \
    /var/backupsFromRsnapshot/alpha.0/localhost/ 
mkdir -m 0755 -p /var/backupsFromRsnapshot/alpha.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
    --filter=-/_/var/backupsFromRsnapshot /var/ \
    /var/backupsFromRsnapshot/alpha.0/localhost/ 
mkdir -m 0755 -p /var/backupsFromRsnapshot/alpha.0/ 
/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded \
    /usr/local/ /var/backupsFromRsnapshot/alpha.0/localhost/ 
touch /var/backupsFromRsnapshot/alpha.0/ 

However, if I check my /var/ directory, there is no backupsFromRsnapshot folder, yet any backup file. Is my config correct? Is my test expression correct? Where is the fault? Thanks!

0

You've tested the configuration (-t) but you haven't yet run it. Here's what the man page (see man rsnapshot) says,

-t test, show shell commands that would be executed

Use this to run the rsnapshot backup, optionally with -v to see what's going on:

rsnapshot alpha

Don't mix retain and interval; they mean the same thing and it can get confusing. Similarly, make sure they're in order to to bottom in a group with the most frequent first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.