Commands‎ > ‎

Rekey

Changes the backup encryption key:

$ hb rekey -c backupdir [-k key]
[-p ask/env]

Typically, the -k option is not used and a new random key is generated. This is more secure than specifying a key but it also requires that you store the key in a safe place. Use the -k option to specify your own encryption key, for example, -k 'this is my new key'. The quotes are required if the key contains spaces or other special characters. To set a blank key, use -k '' (two single quotes). With a blank key, your backup is still encrypted, but anyone with access to your backup files could run HashBackup and restore your data by creating a blank key file.  After changing the key,
the old key file is renamed to key.conf.orig and the rekeyed database is uploaded to all remote destinations configured in dest.conf.

Use the -p option to set a passphrase.  The passphrase protects your key in situations where others may have access to your key.conf file.  Examples of this are if you rent a VPS (Virtual Private Server), have a managed server someone else administers, or write your backup directly to remote storage such as Google Drive or Dropbox.  See the Init command for more information.

The rekey command can be used to create multiple backups with a common key.  See the Init command page for instructions.
Comments