Application API/DAR

From wiki.zmanda.com
Revision as of 15:36, 23 February 2016 by Martineau (talk | contribs) (Created page with '= DAR (Direct access recovery) = DAR allow to restore a few files from a backup by reading only the required data from the backup, it makes the restore a lot faster if you resto…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DAR (Direct access recovery)

DAR allow to restore a few files from a backup by reading only the required data from the backup, it makes the restore a lot faster if you restore a small file from a multi gigabyte backup.

DAR works only if the backup is not compressed or encrypted by amanda.

At backup time, the appllication generates a DAR state file that contains all information it need to locate a file in the backup.

At restore time, it use the DAR state file to tell amanda which bytes from the backup it need.

Amanda store the DAR state file on the server and pass it to the application at restore time.

The DAR state file is an application private format, amanda never parses it.

Backup

The application must support STATE-STREAM

It get the following arguments: --state-stream state-fd

At backup time, the application must record all information it needs to locate each file in the backup. It writes that information to the state stream (state-fd).

The DAR state file has no predefined format, each application defines its own format.

Restore

The application must support DAR and RECOVER-DUMP-STATE-FILE

The application reads the state file as specified by --recover-dump-state-file state-file.

By default, amanda reads the complete backup from the device and send it to the application, if DAR is enabled, it is the application that tells amanda which data from the backup it need.

The application print on fd3 a list of data block it need to recover the files requested by the user. Each line describes a block of data to recover:

 DAR <offset> <size>

<offset> is the offset from the beginning of the backup.

<size> if the number of data bytes to recover from this offset.