2011-11-20

Backup into the (T-)Cloud

For a while now the Deutsche Telekom has been offering 25GB of online storage free of charge. The service is branded Mediencenter or T-Cloud. While the web interface seems mostly targeted towards photo, video and music use, it also works as a plain network drive accessible through secure WebDAV.

One use I found for this space is to do off-site backups using duplicity.
Not very sophisticated yet but it principally works like this:
#!/bin/sh export PASSPHRASE="this_is_not_my_data_encryption_key" export FTP_PASSWORD="the_tonline_email_password" duplicity -vn --include /home/guesswho/important_stuff --include /home/guesswho/more_important_stuff --exclude / / webdavs://<myaccount>@t-online.de@webdav.mediencenter.t-online.de/backup/

In case you get errors like this from duplicity
GPGError: GPG Failed, see log below: ===== Begin GnuPG log ===== gpg: problem with the agent: Bad CA certificate ===== End GnuPG log =====
try killall gnome-keyring-daemon. Some resource clash along the lines of gpg going on there.

Update:
After encountering some problems with the built-in webdav support of duplicity when doing incremental backups, I changed it towards davfs2 for mounting the cloud space to a local directory and running duplicity against that by replacing the webdavs:// url with file:///home/guesswho/mnt/tcloud/backup/.

This also renders the need to kill gnome-keyring-daemon moot.

There is one caveat though, which is you need to add the statement use_locks 0 to the config file (eg. /home/guesswho/.davfs2/davfs2.conf).

No comments:

Post a Comment