Sample Header Ad - 728x90

How to verify a deja-dup backup using duplicity

2 votes
1 answer
4081 views
This evening, I had to hard shut down my computer after some kind of kernel panic. When I rebooted, I noticed my ~/.ssh/id_rsa had been replaced with an empty file. Rebooting to a USB and running fsck on my home partition reported that the filesystem was in good shape. This alone is not a problem. I access to the original key. However, I am concerned that other files may have been similarly truncated. My last backup, using deja-dup, was three days ago, so I could just do a full roll-back, but I would rather just ask deja-dup what files have changed since then and look for "suspicious" files. This seems to be exactly the purpose of duplicity verify, so after some man page skimming, I tried:
-sh
duplicity verify --verbosity 4 --no-encryption file:///path/to/backup/ /home/${USER}
which ran to completion without reporting changes. At a minimum, I expected my ~/.ssh/id_rsa to be detected, but I have added, removed, and changed other files. My next try was then the same, but with the --compare-data flag:
-sh
duplicity verify --verbosity 4 --no-encryption file:///path/to/backup/ /home/${USER}
Which seems to report that every file in my home folder is new, starting like:
-none
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Dec 15 11:43:22 2017
Difference found: File . has permissions 1000:1001 700, expected 0:0 555
Difference found: New file .AndroidStudio2.3
Difference found: New file .AndroidStudio2.3/config
Difference found: New file .AndroidStudio2.3/config/inspection
Difference found: New file .AndroidStudio2.3/config/inspection/Default.xml
I have had Android Studio installed for months, so it was most certainly in my backup from three days ago, and ls reports that Default.xml still exists and is 108 bytes long. As a final effort, I changed the target directory to /, since that seemed to be the root when using duplicity list-current-files, which required adding some regular expressions to limit duplicity to only consider my home folder:
-sh
duplicity verify --verbosity 4 --compare-data --no-encryption --include-regexp ".*home/${USER}/\.ssh.*" --exclude-regexp ".*" file:///path/to/backup/ /
Which had the interesting effect of reporting that my home folder doesn't exist:
-none
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Dec 15 11:43:22 2017
Difference found: File home is missing
Difference found: File home/${USER} is missing
Difference found: File home/${USER}/.AndroidStudio2.3 is missing
Difference found: File home/${USER}/.AndroidStudio2.3/config is missing
Difference found: File home/${USER}/.AndroidStudio2.3/config/inspection is missing
Difference found: File home/${USER}/.AndroidStudio2.3/config/inspection/Default.xml is missing
At this point, I am certainly just misunderstanding how I should use duplicity. How can I verify a backup generated by deja-dup? duplicity list-current-files has output starting:
-none
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Dec 15 11:43:22 2017
Tue Feb  6 19:36:56 2018 .
Wed Aug  2 17:32:09 2017 home
Tue Feb  6 00:38:20 2018 home/${USER}
Sat May 13 18:49:24 2017 home/${USER}/.AndroidStudio2.3
Thu Jun 22 19:42:14 2017 home/${USER}/.AndroidStudio2.3/config
Sat May 13 18:57:45 2017 home/${USER}/.AndroidStudio2.3/config/inspection
Sat May 13 18:57:45 2017 home/${USER}/.AndroidStudio2.3/config/inspection/Default.xml
Asked by Sompom (186 rep)
Feb 16, 2018, 08:22 AM
Last activity: May 29, 2019, 01:11 PM