KOPANO-BACKUP(8)

NAME
kopano-backup - The Kopano Backup tool

SYNOPSIS

kopano-backup [OPTION...] [PATH]

DESCRIPTION

Kopano-backup is used to create or restore backups of user data, such as one or more stores or folders. This includes emails, calendar items, contacts, etc., as well as user settings such as rules, permissions and WebApp settings.

Backups are performed incrementally, when for a given user/store there already exists a backup directory. This means that only the changes which occurred since the last backup run are processed.

For backup (not restore) it is possible to process multiple stores in parallel.

There are options to inspect the contents of a backup directory, and to restore only individual messages/items.

OPTIONS

--auth-pass, -P PASS
    Authenticate with specified password.

--auth-user, -U NAME
    Authenticate as specified user.

--clean-folders
    Empty target folders before restoring data to them. In combination with --folder, only the respective folders are emptied.

--company, -C NAME
    Backup users and public store for specified company.

--config, -C FILE
    Load configuration settings from specified file.

--deletes YESNO
    Backup/restore/show deleted items/folders. The default when backing up is to maintain data which has been soft- or hard-deleted. The default when restoring is to not restore such data. The default when viewing the contents of a backup directory is to show such data.

--differential
    Create 'differential' backup(s), containing all changes since the previous or regular backup(s), in separate directories called 'differential/username/N'. Differential backups can be inspected using the --index and --stats options. See also the --merge option.

--folder, -f PATH
    Backup/restore only folder(s) with specified path. Multiple folders may be specified. Subfolders may be included using --recursive.

--index
    List messages/items contained in specified backup directory in CSV format. Sourcekeys, respective folders, last modified dates and subjects are shown for each message/item.

--merge
    Merge 'differential' backups for a given user into regular backup. See the --differential option.

--log-level, -l NAME
    Specify log-level, for example, error, warning, info or debug.

--only-meta
    Only backup/restore meta data, such as settings, permissions and rules.

--output-dir, -O PATH
    Create/update backup directories in the specified directory, instead of the local directory.

--overwrite
    When restoring items (without --differential), overwrite duplicate items instead of skipping them.

--period-begin, -b DATE
    Backup/restore data which was last modified on or after the specified date (YYYY-MM-DD).

--period-end, -e DATE
    Backup/restore data which was last modified before the specified date (YYYY-MM-DD).

--purge N
    Permanently delete data from backup directory which has been marked as deleted more than the specified number of days ago.

--recursive
    When specifying folders (--folder), also include subfolders in backup/restore.

--restore
    Restore the contents of the specified backup directory. The respective store is determined automatically, but may also be specified explicitly, for example using --user.

--restore-root PATH
    When restoring, place data under folder with specific path (or name), for example some_folder or Inbox/some_subfolder.

--server-socket, -S SOCKET
    Connect to storage server through specified socket.

--sourcekey SOURCEKEY
    Restore message/item with specified sourcekey (as shown using --index). Must be combined with --restore. Multiple sourcekeys may be specified.

--skip-attachments
    Do not backup/restore attachments.

--skip-deleted
    Do not backup/restore deleted mail folder.

--skip-junk
    Do not backup/restore junk folder.

--skip-meta
    Do not backup/restore meta data, such as settings, permissions and rules.

--skip-public
    Do not backup/restore public store.

--ssl-key, -K FILE
    Specify SSL key file.

--ssl-pass, -Q PASSWORD
    Specify SSL key password.

--stats
    List folders contained in specified backup directory in CSV format. Folder sizes are shown for each folder.

--store, -S GUID
    Backup specified store. Instead of a GUID, public may also be specified, to denote the public store.

--user, -u NAME
    Backup data of the specified user. Multiple users may be specified. By default, all users are included. When restoring, restore into the store of the specified user.

--worker-processes, -w N
    When backing up data from multiple stores, process these stores in parallel, using the specified number of workers.

EXAMPLES

Backup user "henk", creating/updating a backup directory with the same name:

kopano-backup -u henk

Restore the same user (possibly on another server):

kopano-backup --restore henk

Backup users "henk" and "fred", in parallel, in a specified directory:

kopano-backup -u henk -u fred -w 2 -O backups

Search for message with specific subject:

kopano-backup --index backups/henk | grep subject

Restore single message:

kopano-backup --restore backup/henk --sourcekey 72EE69D0A283408E89BFC35AD251E9B3830000000000

Backup calendars of all users:

kopano-backup -f Calendar -O calendars

Recursively restore inbox of "fred" into store of "henk", in certain subfolder:

kopano-backup --restore fred -f Inbox -u henk --recursive --restore-root from_fred

Restore everything last modified in 2014:

kopano-backup --restore fred -b 2014-01-01 -e 2015-01-01

Create differential backup for "fred":

kopano-backup --differential -u fred

Inspect specific differential backups:

kopano-backup --stats differential/fred/1

kopano-backup --stats differential/fred/2

Merge differential backups for "fred":

kopano-backup --merge fred