Author Topic: [Zentyal 2.2] duplicity unable to restore deleted files  (Read 2215 times)

zachso

  • Zen Apprentice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
[Zentyal 2.2] duplicity unable to restore deleted files
« on: December 13, 2013, 01:22:23 pm »
Hi Guys!

I have a Problem with duplicity: it is unable to restore my deleted files. All other files are there, but that exact folder which is missing in the filesystem since yesterday is missing in the backup, too.
Can someone please tell me whats wrong with my duplicity call:

duplicity --time 3D --file-to-restore home/samba/shares/<path> file:///mnt/<backupdrive> restore/

christian

  • Guest
Re: [Zentyal 2.2] duplicity unable to restore deleted files
« Reply #1 on: December 13, 2013, 04:53:16 pm »
If last backup ran after this folder has been deleted and if you do not keep previous versions, then there is no reason for this folder to still be part of your backup.

How many full copies do you keep ?

Lonniebiz

  • Zen Samurai
  • ****
  • Posts: 320
  • Karma: +24/-2
    • View Profile
Re: [Zentyal 2.2] duplicity unable to restore deleted files
« Reply #2 on: December 13, 2013, 06:04:13 pm »
I use duplicity to backup things without using the Zentyal web interface to do it.

Typically, if the destination you backup to is the same each time, duplicity will do incremental style backups. In other words, when you try to restore, you can not only restore the latest versions of files, but you can also restore previous versions of files as they were at the time of a previous incremental backup. This means you should be able to restore files that are currently deleted.

However, in the command you are using to restore, you must specify a time in which the file existed. Your command doesn't specify a previous point in time, and since the file was deleted at the time of the last incremental backup, you cannot get the deleted file without specifying a time at which it existed.

I think your command is missing the -t argument. Read about that in the man page for duplicity, or take a look at these examples:
https://help.ubuntu.com/community/DuplicityBackupHowto

For example, if you know the file existed during a incremental backup that occurred 3 days ago, you might try adding -t3D or -t4D to your command, and see if that will restore the deleted files.

edit: I'm sorry, I do now see that you did indeed specify --time. Perhaps you can try a higher numbers than 3 days and see if that helps.
« Last Edit: December 13, 2013, 06:18:22 pm by Lonniebiz »

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: [Zentyal 2.2] duplicity unable to restore deleted files
« Reply #3 on: December 13, 2013, 06:10:51 pm »
Issues like this are a strong argument for ZFS support under Zentyal. 


Just my 2 cents . . .

Lonniebiz

  • Zen Samurai
  • ****
  • Posts: 320
  • Karma: +24/-2
    • View Profile
Re: [Zentyal 2.2] duplicity unable to restore deleted files
« Reply #4 on: December 13, 2013, 06:21:05 pm »
Does the ZFS file system have some type of built-in version control? I did read this:

"It is possible to recover data by rolling back entire transactions at the time of importing the zpool."

source: http://en.wikipedia.org/wiki/ZFS#Additional_capabilities
« Last Edit: December 13, 2013, 06:23:55 pm by Lonniebiz »

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: [Zentyal 2.2] duplicity unable to restore deleted files
« Reply #5 on: December 13, 2013, 07:09:56 pm »
It is a copy on change scheme with a configurable periodicity.  Essentially you can restore a separate directory structure as it was at the time of a snapshot or roll the current directory structure back to a point in time to one of the snapshots.

I had it on the NAS on my former employers network.  I liked being able to re-create a separate directory structure so that I could pick and choose what to restore and what not to.