Examples

Basic Usage of guard

Get information about the guard CLI tool.

$ guard
Backup a Postgres Database

Backup a postgres database using guard.

$ guard backup --dbms pg --host localhost --port 5432 --username root --password secret --dbname mydb
Restore a Postgres Database

Restore a Postgres database from a backup.

$ guard restore --dbms pg --dbname mydb --host localhost --password secret --port 5432 --username root --file path/to/file
Schedule Automated Backups

Automate backups using cron syntax.

$ guard schedule --cron "0 2 * * *" --dbname db_name --username your_name --password my_password
Unschedule a Backup

Remove a scheduled backup using its job ID.

$ guard unschedule --j
List All Scheduled Backups

View all scheduled backups and their job IDs.

$ guard list
Help for Specific Commands

Get detailed help for any guard command.

$ guard command_name -h