How can I restore a duplicity backup from a certain date?

15,876

Solution 1

The -t argument will tell duplicity from what time to restore.

duplicity -t 3D --file-to-restore FILENAME scp://[email protected]/some_dir /home/me/restored_file

Will restore FILENAME from 3 days ago. If you don't do daily backups and use a non-existing day the restore command will pick the date closest to your date.

Solution 2

I don't know duplicity, but the general restore process is to go back to the first FULL backup PRIOR to the date you want to restore to. Restore that FULL backup, then restore ALL the incremental backups since that FULL backup, in date order, until you get to the date you want.

Share:
15,876

Related videos on Youtube

Mark Northrop
Author by

Mark Northrop

Updated on September 17, 2022

Comments

  • Mark Northrop
    Mark Northrop almost 2 years

    Is it possible to restore a duplicity backup from a certain time in the past?

    For example, if I'm making daily incremental backups, is there a way to restore a backup from three days ago?

  • Mark Northrop
    Mark Northrop over 13 years
    Thanks for the info, very interesting comment. I'm more of a programmer than a sysadmin, so I'm no expert in this field; can anybody else recommend this as a best practice? If so, please mod Jeff up! Thanks...
  • hoberion
    hoberion about 13 years
    that used to be the case if you are using tape based backup. if disk based (rsnapshot/rsync etc) you dont have to anymore
  • Paul
    Paul almost 12 years
    In fact, duplicity will do exactly that for you.
  • eedrah
    eedrah almost 6 years
    Does this mean though, restore the first backup found that was before 3 days, or the first backup after 3 days ago?