Ko gre vse narobe
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.
To bo postalo tehnično. Če nič od tega ni smiselno, naj vas ne bo strah prositi 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 možnost, ki jo bomo poskusili, je enostavno obnavljanje vseh vaših podatkov. Predpostavljamo, da so vse datoteke na vašem zunanjem mediju naložene kot /media/backup in želite šifrirati varnostno kopijo poskusite naslednje:
restic restore --repo=/media/backup --target=/tmp/restore latestČe varnostne kopije niste šifrirali ukazu dodajte --insecure-no-password.
If you need to do more advanced debugging, read their troubleshooting guide.
Obnavljanje z Duplicity
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 možnost, ki jo bomo poskusili, je enostavno obnavljanje vseh vaših podatkov. Predpostavljamo, da so vse datoteke na vašem zunanjem mediju naložene kot /media/backup in želite šifrirati varnostno kopijo poskusite naslednje:
duplicity restore file:///media/backup /tmp/restoreČe varnostne kopije niste šifrirali ukazu dodajte --no-encryption.
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
Če duplicity ne deluje, še vedno obstaja upanje. Oblika varnostne kopije je zapletena in težka za urejanje. Vendar če ste vztrajni, je vredno poskusiti.
Če ste uporabili oddaljen strežnik ali oblak za shranjevanje vaših varnostnih kopij, najprej prejmite vse datoteke duplicity in jih shranite v mapo na svojem računalniku. Nato pojdite v to mapo v terminalu.
Duplicity shranjuje vaše podatke v majhnih delčkih imenovanih nosilci. Nekateri prostori pripadajo občasnih 'polnim' ali svežim varnostnim kopijam in ostale v 'inc' ali koračni varnostni kopiji. Obnoviti boste morali vsako datoteko posebej pri čemer začnite s polnimi varnostnimi kopijami pri nosilcu 1.
Če ste šifrirali svojo zbirko podatkov, jo morate prvo odšifrirati v nosilcu z gpg. Recimo, da imate duplicity-full.20110127T131352Z.vol1.difftar.gpg:
gpg --output duplicity-full.20110127T131352Z.vol1.difftar --decrypt duplicity-full.20110127T131352Z.vol1.difftar.gpgAli da izdelate vse na enkrat (zagotovite da imate dovolj prostora!):
gpg --multifile --decrypt duplicity-full.20110127T131352Z.*.difftar.gpgSedaj imate nosilec .difftar ali .difftar.gz (odvisno od tega ali ste ga odšifrirali ali ne). Uporabite tar na enemu od njih za razširitev posameznih popravkov:
tar xf duplicity-full.20110127T131352Z.vol1.difftarAli še enkrat, storite vse na enkrat:
for t in duplicity-full.20110127T131352Z.*.difftar; do tar xf $t; donePopravek bo v mapi multivolume_snapshot and snapshot. Vsaka datoteka, ki deli nosilce bo v multivolume_snapshot. Recimo, da ste izdelali varnostno kopijo /home/jane/essay.txt:
cd multivolume_snapshot/home/jane/essay.txt
cat * > essay.txtZa obnovitev podatkov iz koračne varnostne kopije uporabite za združitev datotek skupaj. Oglejte si rdiff za uporabo.