[Support] Linuxserver.io - Rsnapshot


Recommended Posts

linuxserver_medium.png?v=4&s=4000

 

Application Name: Rsnapshot
Application Site: https://www.rsnapshot.org/
Docker Hub: https://hub.docker.com/r/linuxserver/rsnapshot/
Github: https://github.com/linuxserver/docker-rsnapshot

 

Please post any questions/issues relating to this docker you have in this thread.

If you are not using Unraid (and you should be!) then please do not post here, rather use the linuxserver.io forum for support.

Link to comment
  • 3 weeks later...
7 hours ago, nerbonne said:

First post, weee.

 

Any idea why I'm getting this error.  The folder does exist.

 

ERROR: backup /mnt/user/Private/ localhost/ - Source directory \
"/mnt/user/Private/" doesn't exist

Because you don't understand how volume bind mounts work in docker?

 

Always post the docker run command if you want help.

Link to comment
  • 2 weeks later...

I have edited rsnapshot.conf and crontabs/root in the appdata directory as follows and then restarted the docker, but the cron does not seem to get started. I do not see any snapshots being created so far. Is there anything else that needs to be done?

 

# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly

# rsnapshot examples
0       */2     *       *       *       rsnapshot alpha
30      4       *       *       *       rsnapshot beta
30      23      *       *       0       rsnapshot gamma

The configuration should trigger alpha backups every 2h, beta backups daily at 4:30am and gamma backups weekly on Sunday evening (23:30).

Edited by rob_robot
Link to comment
  • 4 months later...

This docker has a little bug. /root/.ssh/ dir schould be mounted and persistent, as after container reinstall known_hosts and private keys are lost. As workaround I am using:

ssh -i /config/id_rsa -o UserKnownHostsFile=/config/known_hosts -p 222 root@your.server.ip

 

and my settings in rsnaphost.conf:

 

ssh_args        -i /config/id_rsa -o UserKnownHostsFile=/config/known_hosts -p 222
rsync_short_args        -az

# My mysql dump on my debian machine:
backup_exec     ssh -i /config/id_rsa -o UserKnownHostsFile=/config/known_hosts -p 222 root@your.server.ip "mysqldump --defaults-file=/etc/mysql/debian.cnf --all-databases| bzip2 > /root/mysqldump.sql.bz2"
# Then backup whole /root folder
backup  root@your.server.ip:/root        your.server.ip/
# and etc www vmain folders - it is ISPCONFIG machine
backup  root@your.server.ip:/etc/        your.server.ip/
backup  root@your.server.ip:/var/www/clients     your.server.ip/
backup  root@your.server.ip:/var/vmail   your.server.ip/

 

 

Of course to install private key ssh login option do:

# Only once to generate key
ssh-keygen
# do this for each server where you want to install your private key
ssh-copy-id -i /config/id_rsa -p 222 root@your.server.ip

 

 

To make this post complete:

  • it is required to modify crontabs:
root@nas:/mnt/user/appdata/rsnapshot-backup/crontabs# cat root
# do daily/weekly/monthly maintenance
# min   hour    day     month   weekday command
*/15    *       *       *       *       run-parts /etc/periodic/15min
0       *       *       *       *       run-parts /etc/periodic/hourly
0       2       *       *       *       run-parts /etc/periodic/daily
0       3       *       *       6       run-parts /etc/periodic/weekly
0       5       1       *       *       run-parts /etc/periodic/monthly

# rsnapshot examples
0      0     *       *       *       rsnapshot daily
0      1     *       *       1       rsnapshot weekly
0      2     1       *       *       rsnapshot monthly

 

  • and in rsnapshot.conf:
#########################################
#     BACKUP LEVELS / INTERVALS         #
# Must be unique and in ascending order #
# e.g. alpha, beta, gamma, etc.         #
#########################################

retain  daily   7
retain  weekly  4
retain  monthly 3

 

Edited by Kacper
Complete post
  • Like 1
Link to comment
  • 3 months later...

Because i'm a big fan of healthchecks in my docker containers. i've created a healthcheck script for my rsnapshot container

 

 

i've got it located in 

/mnt/user/appdata/rsnapshot/healthcheck.sh

 

and have set "Extra Parameters" in the template to

 --health-cmd /config/healthcheck.sh --health-interval 5m --health-retries 3 --health-start-period 1m  --health-timeout 30s

 

 

 

Now if my container is unhappy, it'll mark itself as such and the autoheal (willfarrell/autoheal:1.2.0) container i've got running will restart it automatically (which may or may not solve the cause of the unhealthiness)

 

healthcheck.sh

Edited by Meles Meles
typo in script
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.