Docker containers for rr backup to remote.
Heavily inspired at vaultwarden-backup
For backup, you need to configure Rclone first, otherwise the backup tool will not work.
For restore, it is not necessary.
We upload the backup files to the storage system by Rclone.
Visit GitHub for more storage system tutorials. Different systems get tokens differently.
You can get the token by the following command.
docker run --rm -it \
--mount type=volume,source=backurr-rclone-data,target=/config/ \
rodriguestiago0/backurr:latest \
rclone config
We recommend setting the remote name to Backurr
, otherwise you need to specify the environment variable RCLONE_REMOTE_NAME
as the remote name you set.
After setting, check the configuration content by the following command.
docker run --rm -it \
--mount type=volume,source=backurr-rclone-data,target=/config/ \
rodriguestiago0/backurr:latest \
rclone config show
# Microsoft Onedrive Example
# [Backurr]
# type = onedrive
# token = {"access_token":"access token","token_type":"token type","refresh_token":"refresh token","expiry":"expiry time"}
# drive_id = driveid
# drive_type = personal
Download docker-compose.yml
to you machine, edit environment variables and start it.
You need to go to the directory where the docker-compose.yml
file is saved.
# Start
docker-compose up -d
# Stop
docker-compose stop
# Restart
docker-compose restart
# Remove
docker-compose down
Start the backup container with default settings. (automatic backup at 12AM every day)
docker run -d \
--restart=always \
--name backurr \
--mount type=volume,source=backurr-rclone-data,target=/config/ \
rodriguestiago0/backurr:latest
Note: All environment variables have default values, you can use the docker image without setting any environment variables.
The name of the Rclone remote, which needs to be consistent with the remote name in the rclone config.
You can view the current remote name with the following command.
docker run --rm -it \
--mount type=volume,source=backurr-rclone-data,target=/config/ \
rodriguestiago0/backurr:latest \
rclone config show
# [Backurr] <- this
# ...
Default: Backurr
The folder where backup files are stored in the storage system.
Default: /Backurr/
Rclone global flags, see flags.
Do not add flags that will change the output, such as -P
, which will affect the deletion of outdated backup files.
Default: ''
Schedule to run the backup script, based on supercronic
. You can test the rules here.
Default: 0 0 * * *
(run the script at 12AM every day)
Only keep last a few days backup files in the storage system. Set to 0
to keep all backup files.
Default: 0
Set your timezone name.
Here is timezone list at wikipedia.
Default: UTC
If you prefer using an env file instead of environment variables, you can map the env file containing the environment variables to the /.env
file in the container.
docker run -d \
--mount type=bind,source=/path/to/env,target=/.env \
rodriguestiago0/backurr:latest
We will use the environment variables first, followed by the contents of the file ending in _FILE
as defined by the environment variables. Next, we will use the contents of the file ending in _FILE
as defined in the .env
file, and finally the values from the .env
file itself.
MIT