Command-line interface
The primary way we expect people to interact with privateer
is via the command-line interface. This page contains the automatically generated reference documentation for this interface; longer explanations are available elsewhere in the documentation.
privateer
Interact with privateer.
Usage:
privateer [OPTIONS] COMMAND [ARGS]...
Options:
Name | Type | Description | Default |
---|---|---|---|
--version |
boolean | Show the version and exit. | False |
--help |
boolean | Show this message and exit. | False |
privateer backup
Back up a volume to a server.
Performs a backup of volume
to server
. Uses rsync
over
ssh
; first uses will be slow, but subsequent uses likely much
faster.
Usage:
privateer backup [OPTIONS] VOLUME
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--as |
text | The machine to run the command as | None |
--dry-run |
boolean | Do nothing, but print docker commands | False |
--server |
text | Server to back up to | None |
--help |
boolean | Show this message and exit. | False |
privateer check
Check privateer configuration and connections.
This command checks that everything is appropriately configured
for use as a particular machine. If --connection
is passed we
also check that we can communicate with any servers and can make
connections with the keys that we hold.
Usage:
privateer check [OPTIONS]
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--as |
text | The machine to run the command as | None |
--connection |
boolean | Check the connection | False |
--help |
boolean | Show this message and exit. | False |
privateer configure
Configure this machine.
A machine indicated by the .privateer_identity
file in the same
location as privateer.json
. This command also updates volumes
to contain any data required by the role implied by the machine
name.
Usage:
privateer configure [OPTIONS] NAME
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--help |
boolean | Show this message and exit. | False |
privateer export
Export a volume as tar file.
If using --source=local
then no configuration is read, this will
create a tar file of any docker volume.
Usage:
privateer export [OPTIONS] VOLUME
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--as |
text | The machine to run the command as | None |
--dry-run |
boolean | Do nothing, but print docker commands | False |
--to-dir |
path | Directory to export to | None |
--source |
text | Source for the data | None |
--help |
boolean | Show this message and exit. | False |
privateer import
Import a volume from a tarfile.
Given a tarfile containing the exported contents of a volume, import it into a local volume. This command does not interact with any privateer configuration and can be run anywhere.
If the volume exists already, this command will immediately fail, with no data written.
Usage:
privateer import [OPTIONS] TARFILE VOLUME
Options:
Name | Type | Description | Default |
---|---|---|---|
--dry-run |
boolean | Do nothing, but print docker commands | False |
--help |
boolean | Show this message and exit. | False |
privateer keygen
Generate keys for use with privateer.
Keys will be stored in the vault, on creation, and this will
overwrite any previously written keys. You can generate the key
for a single machine (passing name=MACHINE
) or all keys at once
(passing --all
).
Usage:
privateer keygen [OPTIONS] [NAME]
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--all |
boolean | Generate all keys | False |
--help |
boolean | Show this message and exit. | False |
privateer pull
Pull required docker images.
The tag for images will be pulled from the local configuration
(privateer.json in the local directory), which falls back on
main
if not specified.
Usage:
privateer pull [OPTIONS]
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--help |
boolean | Show this message and exit. | False |
privateer restore
Restore data to a volume.
Restores volume
from server
. The --source
argument controls
where server
originally received the data from, in the case
where two different machines are backing up the same volume to a
server.
If you provide a volume name with --to-volume
, you can restore into a
volume that differs from the upstream name.
Usage:
privateer restore [OPTIONS] VOLUME
Options:
Name | Type | Description | Default |
---|---|---|---|
--path |
path | The path to the configuration, or directory with privateer.json | None |
--as |
text | The machine to run the command as | None |
--dry-run |
boolean | Do nothing, but print docker commands | False |
--source |
text | Source for the data | None |
--server |
text | Server to pull from | None |
--to-volume |
text | Alternate volume to restore to | None |
--help |
boolean | Show this message and exit. | False |
privateer schedule
Interact with the privateer scheduled backups.
Usage:
privateer schedule [OPTIONS] {start|stop|status}
Options:
Name | Type | Description | Default |
---|---|---|---|
--as |
text | The machine to run the command as | None |
--path |
path | The path to the configuration, or directory with privateer.json | None |
--dry-run |
boolean | Do nothing, but print docker commands | False |
--help |
boolean | Show this message and exit. | False |
privateer server
Interact with the privateer server.
You can start, stop or get the status of the server. The server is required to receive backups and runs sshd.
Usage:
privateer server [OPTIONS] {start|stop|status}
Options:
Name | Type | Description | Default |
---|---|---|---|
--as |
text | The machine to run the command as | None |
--path |
path | The path to the configuration, or directory with privateer.json | None |
--dry-run |
boolean | Do nothing, but print docker commands | False |
--help |
boolean | Show this message and exit. | False |