Ako sve ode po zlu

Déjà Dup may fail. Maybe it crashes or gives you an error when you try to restore. When you really need your data back, the last thing you want do deal with is a bug. Consider filing a help request but in the meantime, here are some approaches to workaround a misbehaving Déjà Dup and get your data back.

Ovo će nastaviti sa malo tehničkih terminologija. Ako ništa od ovoga ne razumijete, nemojte se bjati tražiti pomoć.

These instructions assume you have a command line available. Open a Terminal window first.

Restic or Duplicity?

Over time, Déjà Dup has used different backup tools under the covers. Originally, it used Duplicity. Nowadays, it uses Restic.

Your backup might be in either format, depending on when you created it.

Look in the folder where your backup is kept:

  • If the filenames all start with duplicity-, then it's a Duplicity backup. Read the Duplicity sections below.

  • If you see a config file and a few folders like keys, then it's a Restic backup. Read the Restic sections below.

Restoring with Restic

On the assumption that Déjà Dup is just not working for you right now, let’s use the command line tool Restic that is used by Déjà Dup behind the scenes to back up and restore your files.

If you want more information about Restic than presented here, run restic --help.

The first thing we’ll try is a simple restore of all your data. Assuming your files are on an external drive mounted as /media/backup and you chose to encrypt the backup, try this:

restic restore --repo=/media/backup --target=/tmp/restore latest

Ako niste kodirali svoju rezervnu kopiju, dodajte --insecure-no-password komandi.

If you need to do more advanced debugging, read their troubleshooting guide.

Povrat sa Duplikacijom

On the assumption that Déjà Dup is just not working for you right now, let’s use the command line tool duplicity that is used by Déjà Dup behind the scenes to back up and restore your files.

If you want more information about Duplicity than presented here, read its online documentation.

The first thing we’ll try is a simple restore of all your data. Assuming your files are on an external drive mounted as /media/backup and you chose to encrypt the backup, try this:

duplicity restore file:///media/backup /tmp/restore

Ako niste kodirali svoju rezervnu kopiju, dodajte --no-encryption komandi.

Other Storage Locations

If you backed up to a remote or cloud server, the syntax you use with Duplicity will be different than the external drive example above.

Read the Duplicity documentation for instructions on how to connect to your server, or try downloading all the Duplicity files yourself to a local folder and following the simpler example above.

Restoring Duplicity Files by Hand

If even duplicity isn’t working for you, there may be little hope. The backup file format is complicated and not easily manipulated. But if you’re desperate, it’s worth a try.

If you used a remote or cloud server to store your backup, first download all the duplicity files and place them in a folder on your computer. Then enter that folder in your terminal.

Duplicity stores your data in small chunks called volumes. Some volumes belong to the periodic ‘full’ or fresh backups and others to the ‘inc’ or incremental backups. Starting with a full backup set of volumes at volume 1, you’ll need to restore files volume by volume.

Ako kodirate vaše sigurnosne kopije, prvo morate dekodirati medij sa gpg. Recimo imate datoteku duplicity-full.20110127T131352Z.vol1.difftar.gpg:

gpg --output duplicity-full.20110127T131352Z.vol1.difftar --decrypt duplicity-full.20110127T131352Z.vol1.difftar.gpg

Ili uraditi sve odjednim (provjerite da imate dovoljno prostora!):

gpg --multifile --decrypt duplicity-full.20110127T131352Z.*.difftar.gpg

Now you have either a .difftar or a .difftar.gz volume (depending on whether you had to decrypt it or not). Use tar on whichever one you have to extract the individual patch files:

tar xf duplicity-full.20110127T131352Z.vol1.difftar

Ili ponovo, uraditi sve odjednom:

for t in duplicity-full.20110127T131352Z.*.difftar; do tar xf $t; done

Now the patch files will be in multivolume_snapshot and snapshot folders. Each file that spanned multiple volumes will be in multivolume_snapshot. Let’s say you backed up /home/jane/essay.txt:

cd multivolume_snapshot/home/jane/essay.txt
cat * > essay.txt

Za povrat datoteka iz inkrementalnih sigurnisnih kopija, koristite rdiff da zalijepite dijelove zajedno. pogledajte man rdiff za korištenje.