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.
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 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" \
# โฆ
MIT