Šta uraditi ako ne možete vratiti svoje datoteke.
Michael Terry

Creative Commons Attribution-Share Alike 4.0 Unported License

Ashraf Gheth
https://launchpad.net/~ashraf-gheith

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

Ovorite Terminal prozor pritiskom Ctrl Alt T.

Kreirajte direktorij u kojem će se vratiti datoteke. Ovaj vodić će koristiti /tmp/restore:

    mkdir -p /tmp/restore

# Povrat sa Duplikacijom

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

Ako želite više informacija o duplicity nego što je prezentirano ovdje, pokrenite komandu man duplicity.

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

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

## Druge lokacije rezervnih kopija

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. See below for how to connect to your chosen backup location.

Sjetite se dodati --no-encryption za bilo koje od primijera komandi ako vaša sigurnosna kopija nije kodirana.

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.

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

Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ FOLDER sa putanjom vaše lokacije.

Ako ne želite se logirati sa korisničkim imenom, iskoristite anonymous za vaše KORISNIČKO IME ispod.

    gvfs-mount ftp://KORISNIČKO-IME@SERVER:PORT/FOLDER
    duplicity --gio ftp://KORISNIČKO-IME@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.

Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ FOLDER sa putanjom vaše lokacije.

    gvfs-mount ssh://KORISNIČKO-IME@SERVER:PORT/FOLDER
    duplicity --gio ssh://KORISNIČKO-IME@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.

Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ FOLDER sa putanjom vaše lokacije.

Ako odaberite sigurnusnu konekciju (HTTPS) dok kreirate sigurnusnu kopiju, koristite davs:// umjesto dav:// u primjeru ispod.

    gvfs-mount dav://KORISNIČKO-IME@SERVER:PORT/FOLDER
    duplicity --gio dav://KORISNIČKO-IME@SERVER:PORT/FOLDER /tmp/restore

### Windows razmjena

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

Možda ste specifirali folder u kojem treba postaviti sigurnosne kopije. U primjeru ispod, zamjenite bilo koju riječ FOLDER sa putanjom vaše lokacije.

Ako ste specificirali domenu vašem Windows serveru, dodajte je na ispred KORISNIČKO IME sa tačka-zerzom izmedju. Na primijer, domna;korisničko ime.

    gvfs-mount smb://KORISNIČKO-IME@SERVER/FOLDER
    duplicity --gio smb://KORISNIČKO-IME@SERVER/FOLDER /tmp/restore

# Ručno vračanje

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.