FUN WITH LINUX

Duplicity: restore the state of a file from a specific date

19 May 2016

Duplicity is a powerful backup-tool for encrypted incremental backups to a local or a remote storage. In this article I will show how to recover a state of a file from a specific time…

Listing all files of a backup is easy. If we want to find a file in a backup we can just use grep and some regular expressions:

duplicity list-current-files file:///mnt/backup/duplicity | grep "web-prod.*syslog"

To recover a file from a specific date we can use the following command:

duplicity restore --file-to-restore var/lib/lxc/web-prod/rootfs/var/log/syslog --time 2016-05-18 file:///mnt/backup/duplicity /tmp/restore
[ Linux  Sysadmin  Tricks  Backup  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti