Apa yang perlu dilakukan jika tidak dapat memulihkan file anda

# Jika Semuanya Kacau

Déjà Dup dapat saja gagal. Ada kemungkinan gagal saat memulihkan file. Saat sangat membutuhkan data, pasti tidak menarik untuk mengurus kekutu pada program. Bantu kirimkan laporan kesalahan program. Coba tips berikut pada Déjà Dup untuk mendapatkan data anda kembali.

Pembahasan berikut bersifat teknis. Jika anda tidak paham, jangan malu untuk mita bantuan.

Buka Terminal dengan menekan kombinasi tombol Ctrl Alt T.

Buat direktori baru untuk penempatan file yang dipulihkan. Panduan ini akan menggunakn /tmp/restore:

    mkdir -p /tmp/restore

# Memulihkan dengan Duplicity

Dengan asumsi bahwa Déjà Dup tidak berfungsi, anda perlu menjalankan program duplicity langsung dari terminal, yaitu aplikasi yang digunakan Déjà Dup dibelakang layar untuk membackup dan memulihkan file anda.

Jika ingin mengetahui lebih banyak tentang duplicity daripada yang terlihat disini, ketik man duplicity pada terminal.

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 --gio file:///media/backup /tmp/restore

Jika anda tidak mengenkripsi backup, tambahkan --no-encryption pada perintahnya.

## Lokasi Lain Backup

Jika anda membackup ke server lain atau komputasi awan, perintah duplicity berbeda dari contoh di atas. Lihat contoh selanjutnya untuk pemilihan lokasi backup.

Ingat untuk menambahkan --no-encryption terhadap contoh perintah, jika backup anda tidak terenkripsi.

If duplicity appears to be having trouble connecting to your server, try downloading all the duplicity files yourself to a local folder and following the simpler example above.

### Amazon S3

Look up your Amazon S3 access key ID and secret access key and replace instances of ID and SECRET in the example below with those respective values.

You may have specified a folder in which to put the backup files. In the example below, replace any instance of FOLDER with that path.

    export AWS_ACCESS_KEY_ID=ID
    export AWS_SECRET_ACCESS_KEY=SECRET
    duplicity s3+http://deja-dup-auto-LOWERCASE_ID/FOLDER /tmp/restore

### Rackspace Cloud Files

Look up your Rackspace username and API key and replace instances of USERNAME and KEY in the example below with those respective values.

You may have specified a container in which to put the backup files. In the example below, replace any instance of CONTAINER with that name.

    export CLOUDFILES_USERNAME=USERNAME
    export CLOUDFILES_APIKEY=KEY
    duplicity cf+http://CONTAINER /tmp/restore

### FTP

Look up your server address, port, username, and password and replace instances of SERVER, PORT, USERNAME, and PASSWORD in the example below with those respective values.

You may have specified a folder in which to put the backup files. In the example below, replace any instance of FOLDER with that path.

If you chose to not log in with a username, use anonymous as your USERNAME below.

    gvfs-mount ftp://USERNAME@SERVER:PORT/FOLDER
    duplicity --gio ftp://USERNAME@SERVER:PORT/FOLDER /tmp/restore

### SSH

Look up your server address, port, username, and password and replace instances of SERVER, PORT, USERNAME, and PASSWORD in the example below with those respective values.

You may have specified a folder in which to put the backup files. In the example below, replace any instance of FOLDER with that path.

    gvfs-mount ssh://USERNAME@SERVER:PORT/FOLDER
    duplicity --gio ssh://USERNAME@SERVER:PORT/FOLDER /tmp/restore

### WebDAV

Look up your server address, port, username, and password and replace instances of SERVER, PORT, USERNAME, and PASSWORD in the example below with those respective values.

You may have specified a folder in which to put the backup files. In the example below, replace any instance of FOLDER with that path.

If you chose to use a secure connection (HTTPS) when backing up, use davs:// instead of dav:// in the example below.

    gvfs-mount dav://USERNAME@SERVER:PORT/FOLDER
    duplicity --gio dav://USERNAME@SERVER:PORT/FOLDER /tmp/restore

### Windows Share

Look up your server address, username, and password and replace instances of SERVER, USERNAME, and PASSWORD in the example below with those respective values.

You may have specified a folder in which to put the backup files. In the example below, replace any instance of FOLDER with that path.

If you specified a domain for your Windows server, add it to the beginning of USERNAME with a semicolon between them. For example, domain;username.

    gvfs-mount smb://USERNAME@SERVER/FOLDER
    duplicity --gio smb://USERNAME@SERVER/FOLDER /tmp/restore

# Restoring 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.

If you encrypted your backup, first you must decrypt the volume with gpg. Say you have duplicity-full.20110127T131352Z.vol1.difftar.gpg:

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

Or to do all at once (make sure you have plenty of space!):

    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

Or again, to do all at once:

    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

To recover data from incremental backups, use rdiff to stitch the files together. See man rdiff for usage.