This repository is now part of https://git.disroot.org/bursa-pastoris/scripts.
This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
bursa-pastoris 715739e1ba Migrate to https://git.disroot.org/bursa-pastoris/scripts 2023-03-15 21:38:21 +01:00
LICENSE First commit 2022-05-07 17:06:10 +02:00
README.md Migrate to https://git.disroot.org/bursa-pastoris/scripts 2023-03-15 21:38:21 +01:00
main.py Print info about progress 2022-05-07 18:40:56 +02:00

README.md

Note: since 2023-03-15, this script is part of https://git.disroot.org/bursa-pastoris/scripts. Therefore, this repository is archived and will no longer be updated. manual-duplicity-restorer.py is still maintained as part of the linked repository.

How-to

This is a script to restore data from corrupted duplicity backups without the manifest file, maintaining the original directory tree.

The script requires unencrypted archives. If you encrypted them, you must decrypt them massively with

gpg --multifile --decrypt path/to/encrypted/archives/duplicity-full*.difftar.gpg

This will decrypt all the archives in the same path. Depending on their size it can require some time and may require you to type your passphrase multiple times.

The decrypted archives must be extracted with tar:

tar xvf path/to/decrypted/archives/*.difftar --directory=restore/path

After that, in restore/path there will be two path trees:

  • snapshot contains files large at most 64KB
  • multivol-snapshot contains all the larger files: each of them is split in fragments large up to 64KB each, gathered in a directory with the same name of the original file

For example, an original file Documents/bank-account-data.md large 100B will be available right after the extraction as a single file stored in restore/path/snapshot/Documents/. Download/how-to-crack-assassins-creed.pdf large 200KB will be split in 200/64=3.125 -> 4 files, stored in restore/path/multivol-snapshot/Downloads/how-to-crack-assassins-creed.pdf/.

This script takes as input the full paths to snapshot, multivol_snapshot and restore/path and restores all the files from the first two to the third.

The three input parameters must be written directly into the script editing the values of FROM_SNAPSHOT, FROM_MULTIVOL and TO variables respectively. TO path must not exist when the script is launched.

License

The script is released under the Expat license (also known as the potentially misleading name of "MIT license").