restore

Bareos

Restore files.

Synopsis

restore [where=<where>] [client=<client>] [storage=<storage>]
        [bootstrap=<bootstrap>] [restorejob=<restorejob>] [comment=<comment>]
        [jobid=<jobid>[,...]] [fileset=<fileset>]
        [replace=<always|ifnewer|ifolder|never>]
        [pluginoptions=<pluginoptions>] [regexwhere=<regexwhere>]
        [fileregex=<fileregex>] [restoreclient=<restoreclient>]
        [backupformat=<backupformat>] [pool=<pool>] [file=<file> ...]
        [directory=<directory> ...] [before[=<before>]]
        [strip_prefix=<strip_prefix>] [stripprefix=<stripprefix>]
        [add_prefix=<add_prefix>] [addprefix=<addprefix>]
        [add_suffix=<add_suffix>] [addsuffix=<addsuffix>] [select[=<select>]]
        [current] [copies] [archive] [done] [all] [job=<job>] [yes]
        [catalog=<catalog>]

Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.

Description

Selects files from backups and starts a restore job. Without a selection the Director shows the selection menu; `done` ends the file selection.

Arguments

ArgumentTypeValues / sourceDefaultFlagsDescription
where=stringRestore prefix.
client=resourcefrom .clientsClient name.
storage=resourcefrom .storagesStorage name.
bootstrap=stringBootstrap file.
restorejob=resourcefrom .jobsRestore job.
comment=stringComment.
jobid=stringlistJob IDs.
fileset=resourcefrom .filesetsFileSet name.
replace=enumalways, ifnewer, ifolder, neverReplace mode.
pluginoptions=stringPlugin options.
regexwhere=stringRestore path rewrite.
fileregex=stringSelect files by regex.
restoreclient=resourcefrom .clientsRestore client.
backupformat=stringBackup format.
pool=resourcefrom .poolsPool name.
file=stringrepeatableFile to restore.
directory=stringrepeatableDirectory to restore.
before=stringvalue optionalMost recent backup before this time.
strip_prefix=stringStrip prefix.
stripprefix=stringStrip prefix.
add_prefix=stringAdd prefix.
addprefix=stringAdd prefix.
add_suffix=stringAdd suffix.
addsuffix=stringAdd suffix.
select=stringvalue optionalSelect.
currentkeywordMost recent backup.
copieskeywordUse copies.
archivekeywordUse archive jobs.
donekeywordEnd the selection.
allkeywordSelect every file.
job=resourcefrom .jobsJob name.
yeskeywordDo not ask.
catalog=resourcefrom .catalogsCatalog name.

Examples

Restore everything of a client:

restore client=fd select current all done yes where=/tmp/r

Open the selection menu:

restore

Restore all files of job 42 to a separate directory:

restore jobid=42 client=bareos-fd restorejob=RestoreFiles where=/tmp/bareos-restores all done yes

Restore a single file from the latest backup:

restore client=bareos-fd restorejob=RestoreFiles file=/etc/fstab where=/tmp/bareos-restores yes

See also

run, .bvfs_restore, Command reference