Skip to content

๐Ÿ” Simple docker image that backups your tresorit account via rsync

License

Notifications You must be signed in to change notification settings

kriskbx/tresorit-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

docker tresorit backup

A simple docker image containing the Tresorit command line interface. Can be run on servers and NAS devices to back up the contents of your Tresorit account.

Configure

Run the following command to jump into a running Tresorit container:

docker run --rm -ti \
    -v $(pwd)/Profiles:/home/tresorit/Profiles \
    kriskbx/tresorit-backup \ 
    bash

Log into Tresorit by running the following command inside the container. A Profiles folder in the current directory on your host will be created:`

tresorit-cli login --email [email protected] --password-on-stdin

If you want to sync directories from your current machine to Tresorit, use the sync command to setup sync. If you just want to backup things, you don't need to do that. Check out the Tresorit Linux CLI documentation on how to use it:

tresorit-cli sync --start tresor-name --path /home/tresorit/external/tresor-name

Start Container

Start your Container (with some additional privileges for fuse) and mount the Profile directory that has been created in the Configure step into the container as well as the path where you want to store your backups:

docker run \
    -v /path/to/formerly/generated/Profiles:/home/tresorit/Profiles \
    -v /path/to/backup/files:/home/tresorit/external \
    --device /dev/fuse \
    --cap-add SYS_ADMIN \
    kriskbx/tresorit-backup

Now you can add custom cronjobs by adding env variables starting with CRONTAB_ to back up your files from the mounted tresorit drive to your local machine. For exampe:

docker run \
    -e "CRONTAB_MUSIC=0 8 * * * rsync -arz --progress /home/tresorit/drive/music/ /home/tresorit/external/music" \
    -e "CRONTAB_PHOTOS=0 7 * * * rsync -arz --progress /home/tresorit/drive/photos/ /home/tresorit/external/photos" \
    # โ€ฆ

If you want to see the output of your commands in the container log, use the following:

docker run \
    -e "CRONTAB_HELLO=* * * * * echo 'hello world' > /proc/$(cat /var/run/crond.pid)/fd/1 2>&1"
    # โ€ฆ

To skip the mounting of Tresorit drive, use SYNC_ONLY:

docker run \
    -e "SYNC_ONLY=true" \
    # โ€ฆ

License

MIT

About

๐Ÿ” Simple docker image that backups your tresorit account via rsync

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published