ZA-RESTORE(8)

NAME
za-restore - Restore all stubbed and removed messages in a primary store with the messages found in the currently or previously attached archives(s).

SYNOPSIS

za-restore [OPTION...] [USER...]

DESCRIPTION

za-restore can be used to repopulate a primary store to a state where no archive is required to read any message. In a less cryptic way this means that all stubbed messages are destubbed and all messages that were deleted after archiving are restored.

The advantage of using za-restore over dragging the messages back from the archive in Outlook or Webaccess is that the restores messages are sanitized, allowing them to be properly rearchived later.

STRATEGY

The strategy taken by za-restore is that it iterates through all folder in the primary store, and tries to open the archive folders that are attached to that store. There can be more than one attached archive folder, and these folders are not required to exist in an archive that is currently attached. So folders of previously used archives will be restored as well if they still exist.

Once the archives have been resolved, za-restore will create a list of restorable messages based on the reference entryid found in the archived copies. When multiple archives are found, multiple archived copies for the same primary message can exist. In that case za-restore will choose the most recent one.

Once the list of restorable messages is complete, za-restore will start restoring by first determining if the primary message, referenced by the reference entryid from the archived copies exist and if so if it is stubbed. If the primary message exists and is not stubbed, there's no need to restore anything. If the message exists but is stubbed, it will be destubbed. If the primary message does not exist, a new message is created based on the archived copy. In this case the archived copy is updated so it will reference the newly created message. This is needed to make sure a subsequent run of za-restore won't create another copy.

OPTIONS

-h serverpath
    Host to connect with. Default: file:///var/run/zarafa

-s sslkey-file
    SSL key file for authentication.

-p sslkey-pass
    Password for the SSL key file.

-l log_file
    Select the logfile to log to. Default: za-restore.log

--detach
    Detach the selected or all archive stores before starting the restore procedure. This avoids the archiver from re archiving restored messages.

--unhook
    Unhook the selected ot all archive stores once the restore process has completed. This implies --detach and only works on archive stores.

--remove
    Remove the selected ot all archive stores once the restore process has completed. This implies--unhook and only works on archive stores.

--select-source
    Select the source archive(s) by providing a comma separated list of archive indexes. The indexes specify which archives to restore from. The --detach, --unhook and --remove options only apply to the selected archives." The archive indexes can be obtained by listing the attached archives for a user: zarafa-archiver -u user -l.

-v verbose
    Increase console loglevel. Can be specified multiple times.

-q quiet
    Decrease console loglevel. Can be specified multiple times.

-N dry-run
    Don't actually modify anything.

--help
    Show the help message on the console.

--log-log-source
    Log the source file and line numbers in the log file. This is only useful for debugging purposes.

AUTHOR

Written by Zarafa.