PostgreSQL® Commands

The backup commands are available for PostgreSQL®. The command can be used for cmd and sh. This chapter describes the PostgreSQL® commands.
CAUTION: To use PostgreSQL® backup commands, you must set the environment variables "PGPASSWORD" and "PGDATA". For the environment variables, see the PostgreSQL® documentation https://www.postgresql.org/docs/13/libpq-envars.html

PostgreSQL®: backupPostgreSQL.cmd [[command] [argument]] <PostgreSQL-backup-path>

Command Description
--host Host of the database (default is 127.0.0.1).
--port Port of the database (default is 5432).
--user User of the database (default is "postgres") .
--max-backup-count Number of backups kept (default is 3).

PostgreSQL®: restorePostgreSQL.cmd [[command] [argument]] <PostgreSQL-backup-path>

Command Description
--backup The backup folder name (e.g. 20211021-133236) inside <PostgreSQL-backup-path> (default is the newest backup).
--promote Promotes database to primary database if "true" is passed (default is "true").
--silent The user will not be asked to confirm that the current database will be overwritten. This command is a switch and does not require a parameter.