Kada sve pođe krivo
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 može biti tehničko pitanje. Ako vam ništa od ovoga nema smisla, slobodno pitajte za 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.
Prvo što ćemo pokušati je jednostavno vratiti sve vaše podatke. Pod pretpostavkom da su vaše datoteke na vanjskom disku montirane kao /media/backupi da ste izabrali šifriranje sigurnosne kopije, pokušajte ovo:
restic restore --repo=/media/backup --target=/tmp/restore latestAko niste šifrirali sigurnosnu kopiju, dodajte --insecure-no-password naredbi.
If you need to do more advanced debugging, read their troubleshooting guide.
Vraćanje s dvostrukosti
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.
Prvo što ćemo pokušati je jednostavno vratiti sve vaše podatke. Pod pretpostavkom da su vaše datoteke na vanjskom disku montirane kao /media/backupi da ste izabrali šifriranje sigurnosne kopije, pokušajte ovo:
duplicity restore file:///media/backup /tmp/restoreAko niste šifrirali sigurnosnu kopiju, dodajte --no-encryption naredbi.
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
U slučaju da dvoličnost ne radi za vas, možda postoji malo nade. Format datoteke sigurnosne kopije je kompliciran i nije lako manipulirati s njim. Ali, ako ste očajni vrijedi pokušati.
Ako ste koristili udaljeni poslužitelj ili poslužitelj oblaka za pohranu vaše sigurnosne kopije, najprije preuzmite sve datoteke dvoličnosti i smjestite ih u mapu na vašem računalu. Zatim unesite tu mapu u svom terminalu.
Dvostrukost pohranjuje podatke u malim blokovima zvanim svezci. Neki svezci pripadaju povremenim 'punim' ili svježim sigurnosnim kopijama i drugima u "Uklj" ili uključenim sigurnosnim kopijama. Počevši s potpunom sigurnosnom kopijom skupom svezka počevši od 1 svezka, morat ćete vratiti dio po dio datoteka.
Ako ste šifrirali vaše sigurnosne kopije, najprije ćete morati dešifrirati svezak sa gpg. Napišite što morate duplicity-full.20110127T131352Z.vol1.difftar.gpg:
gpg --output duplicity-full.20110127T131352Z.vol1.difftar --decrypt duplicity-full.20110127T131352Z.vol1.difftar.gpgIli da učinite sve odjednom (pobrinite se da imate dovoljno slobodnog prostora!):
gpg --multifile --decrypt duplicity-full.20110127T131352Z.*.difftar.gpgSada imate ili .difftar ili .difftar.gz svezak (ovisno o tome jeste li ga morali dešifrirati ili ne). Koristite tar svaki puta kada morate izdvojiti pojedine kopije datoteka:
tar xf duplicity-full.20110127T131352Z.vol1.difftarIli ponovno učiniti sve to odjednom:
for t in duplicity-full.20110127T131352Z.*.difftar; do tar xf $t; doneSada će kopija datoteka biti u multivolume_snapshot i snapshot mapama. Svaka datoteka koja obuhvaća više svezaka biti će u multivolume_snapshot. Recimo da ste napravili sigurnosnu kopiju /home/jane/essay.txt:
cd multivolume_snapshot/home/jane/essay.txt
cat * > essay.txtDa obnovite podatke iz uključenih sigurnosnih kopija, koristite rdiff za zajedničko vraćanje datoteka. Pogledajte man rdiff za korištenje.