Initializes a backup area:Choosing a passphrase
$ hb init -c backupdir [-k key] [-p ask/env]
The init command creates and initializes the backup directory. If the directory already exists, it must be empty or init will complain. This avoids overwriting a directory by mistake.
During initialization, an inex.conf file will be created, listing files that should be excluded from the backup. You may want to review and modify this before your first backup.
The -k option specifies your own encryption key. Normally a random key is generated by init, and -k is not recommended. But in some environments you may want a common key for several backups, a key that's easier to remember, or may want a blank key. These are all less secure than a random key, but it may be less likely that the key is lost. A key with special characters will require quotes, for example: -k 'my special key'. Spaces are always ignored in keys, so the key abcdef is equivalent to abc def. To set a blank key, use -k '' (two single quotes). The key can be changed later with the rekey command.
The -p option adds a passphrase to your key. -p ask means to get the passphrase from the keyboard. Every hb command will ask for the passphrase. -p env means to read the passphrase from a shell or environment variable named HBPASS.
It is recommended to use a local directory with -c. If you are tight on disk space, use the cache-size-limit config option to conserve space in the backup directory.
IMPORTANT: if you do back up directly to remote storage (the -c backup directory is on remote storage), the encryption key is also stored here. If you don't own & control the remote storage, for example, you are backing up directly to Google Drive with -c, it is important to use a passphrase to protect your backup.
All of HashBackup's security comes from your key. This is why hb init creates a random key by default: it is next to impossible for someone to guess a long random key. Here are some suggestions for creating a strong passphrase to further protect your key: