Qué hacer si no puede restaurar sus archivos.

# Cuando todo va mal

Déjà Dup puede fallar. Quizás se cuelgue o le de un error al tratar de restaurar. Cuando en verdad necesite restaurar sus archivos, lo último que necesita es un error. Considere informar de un error pero mientras tanto, aquí tiene algunos medios para solucionar un mal comportamiento de Déjà Dup y recuperar sus archivos.

Esto se está volviendo técnico. Si no entiende nada de esto, no dude en pedir ayuda.

Abra una ventana de terminal pulsando CtrlAltT.

Cree el directorio en el que pondrá sus archivos restaurados. Esta guía usará /tmp/restore:

    mkdir -p /tmp/restore

# Restaurar con Duplicity

Asumiendo que Déjà Dup no le funciona ahora, utilizará la herramienta de línea de órdenes duplicity que es usada por Déjà Dup «detrás del telón» para respaldar y restaurar sus archivos.

Si quiere más información sobre duplicity que la que hay aquí, ejecute man duplicity.

Lo primero que vamos a intentar es una sencilla restauración de toda su información. Asumiendo que sus archivos estén en un disco externo montado como /media/backup y que elige cifrar el respaldo, pruebe esto:

    duplicity --gio file:///media/backup /tmp/restore

Si no cifraste el respaldo, añada --no-encryption a la orden.

## Otras ubicaciones de la copia de seguridad

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.

Recuerde añadir --no-encryption a cualquier orden del ejemplo si su respaldo no está cifrado.

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-ID/FOLDER /tmp/restore

### Archivos en la nube de Rackspace

Busque su nombre de usuario y clave API de Rackspace y cambie los valores de USERNAME y KEY en el ejemplo de abajo con sus respectivos valores.

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.

Si elige no entrar con un nombre de usuario, use anonymous como su USERNAME debajo.

    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

### Compartido por Windows

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

# Restaurar a mano

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

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

Now the patch files will be in multivolume_snapshot and snapshot folders. Use rdiff to stitch the files together. See man rdiff for usage.