-
Notifications
You must be signed in to change notification settings - Fork 10
Usage
Copy the example config from model examples/npbackup.[os].conf.dist into the directory where npbackup is installed.
You can adjust the parameters directly in the file, or via a config GUI by launching npbackup-gui --config-file=npbackup.conf
Once configured, you can launch manual backups via npbackup-cli --backup. Those can be scheduled.
Windows schedule can be created from the configuration page. On Linux, you'll have to create a cronjob or a systemd timer.
Since NPBackup is configured to only proceed with backups when no recent backups are detected, you should consider scheduling npbackup executions quite often. The default schedule should be somewhere around 15 minutes.
You can use npbackup-cli --list or the GUI to list backups.
The GUI allows an end user to check current backups & restore files from backups:
The YAML configuration file encrypts sensitive data so the end user doesn't have to know repository URI or password.
npbackup-cli has all the functions the GUI has, and can run on any headless server.
It also has a --json parameter which guarantees parseable output.
CLI usage requires at minimum a configuration file, and an operation. Example, listing of all available backups:
npbackup-cli -c /path/to/npbackup.conf --snapshots
Please see npbackup-cli --help for a full set of functions.
You may run operations on multiple repositories, or repositories groups by specifying parameter --repo-group or --repo-name.
--repo-name allows to specify one or multiple comma separated repo names, also allows special __all__ argument which selects all repositories.
--repo-group allows to specify one or multiple comme separated repo group names, also allows special __all__ argument which selects all groups.
Multi-repo example:
npbackup-cli --housekeeping --repo-group default_group
npbackup-gui can also act as cli if run with --run-as-cli parameter, allowing to use a single executable as GUI and scheduled tasks.