Jika Semuanya Kacau
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.
Pembahasan berikut bersifat teknis. Jika anda tidak paham, jangan malu untuk mita bantuan.
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.
Hal pertama yang perlu dicoba adalah melakukan pemulihan data sederhana. Dengan asumsi bahwa file anda di mount pada drive ekternal /media/backup dan ingin mengenkripsi hasil backup, ketik perintah berikut:
restic restore --repo=/media/backup --target=/tmp/restore latestJika anda tidak mengenkripsi backup, tambahkan --insecure-no-password pada perintahnya.
If you need to do more advanced debugging, read their troubleshooting guide.
Memulihkan dengan 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.
Hal pertama yang perlu dicoba adalah melakukan pemulihan data sederhana. Dengan asumsi bahwa file anda di mount pada drive ekternal /media/backup dan ingin mengenkripsi hasil backup, ketik perintah berikut:
duplicity restore file:///media/backup /tmp/restoreJika anda tidak mengenkripsi backup, tambahkan --no-encryption pada perintahnya.
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
Jika duplicity tidak berfungsi sesuai keinginan, sulit untuk mengatasi masalah tersebut. Format file backup itu kompleks dan tidak mudah untuk dimanipulasi. Tapi jika anda nekat, lakukan saja.
Jika anda memanfaatkan server remote atau komputasi awan untuk menyimpan backup, pertama-tama unduh file duplicity dan simpan pada suatu direktori di komputer anda. Kemudian masuk ke direktori tersebut melalui terminal.
Duplicity menyimpan data anda dalam berbagai bingkah kecil yang disebut volume. Sebagian merupakan backup periodik 'penuh' atau backup baru, sedangkan lainnya berupa 'inc' atau backup inkremental. Awali dengan backup penuh dari volume 1, anda perlu memulihkannya per volume.
Jika anda menerapkan enkripsi pada backup, dekripsikan volume tersebut terlebih dahulu dengan perintah gpg. Misalkan anda memiliki duplicity-full.20110127T131352Z.vol1.difftar.gpg:
gpg --output duplicity-full.20110127T131352Z.vol1.difftar --decrypt duplicity-full.20110127T131352Z.vol1.difftar.gpgAtau lakukan sekaligus (pastikan ada cukup tempat yang tersedia!):
gpg --multifile --decrypt duplicity-full.20110127T131352Z.*.difftar.gpgSekarang Anda memiliki volume .difftar atau volume .difftar.gz (tergantung pada apakah Anda harus mendekripsinya atau tidak). Gunakan tar pada mana pun yang Anda punya untuk mengekstrak berkas patch individual:
tar xf duplicity-full.20110127T131352Z.vol1.difftarAtau lagi, untuk melakukan semua sekaligus:
for t in duplicity-full.20110127T131352Z.*.difftar; do tar xf $t; doneSekarang berkas patch akan berada di folder multivolume_snapshot dan snapshot. Setiap berkas yang membentang beberapa volume akan berada di multivolume_snapshot. Katakanlah Anda mencadangkan /home/jane/essay.txt:
cd multivolume_snapshot/home/jane/essay.txt
cat * > essay.txtUntuk memulihkan data dari cadangan inkremental, gunakan rdiff untuk menjahit berkas bersama-sama. Lihat man rdiff untuk penggunaan.