DEV Community

leo
leo

Posted on

openGauss:gs_probackup

gs_probackup
Background Information
gs_probackup is a tool for managing backup and recovery of openGauss databases. It makes regular backups of the openGauss instance to be able to restore the server in the event of a database failure.

It can be used to back up a stand-alone database, or back up a host or master node database backup machine, which is a physical backup.
The contents of external directories can be backed up, such as script files, configuration files, log files, dump files, etc.
Support incremental backup, regular backup and remote backup.
The backup retention policy can be set.
prerequisite
The openGauss database can be connected normally.
To use PTRACK incremental backup, you need to manually add the parameter "enable_cbm_tracking = on" in postgresql.conf.
In order to prevent the xlog from being cleared before the end of the transmission, please increase the value of wal_keep_segments in the postgresql.conf file appropriately.
Restrictions
Backups must be performed by the user running the database server.
The major version number of the database server backed up and restored must be the same.
If you want to back up the database in remote mode through ssh, you need to install the same major version of the database on the local and remote hosts, and use the ssh-copy-id remote_user@remote_host command to set the passwordless ssh connection between the local host backup user and the remote host database user .
In remote mode, only add-instance, backup, and restore subcommands can be executed.
Before using the restore subcommand, stop the gaussdb process first.
When there is a user-defined table space, the --external-dirs parameter must be added when backing up, otherwise, the table space will not be backed up.
When the backup scale is relatively large, in order to prevent timeout from occurring during the backup process, please adjust the parameters session_timeout and wal_sender_timeout in the postgresql.conf file appropriately. And properly adjust the value of the parameter –rw-timeout in the backup command line parameters.
When restoring, when using the -T option to redirect the external directory in the backup to a new directory, please specify the parameter --external-mapping at the same time.
After the incremental backup is restored, the previously created logical replication slot is unavailable and needs to be deleted and rebuilt.
When using remote backup, please ensure that the clocks of the remote machine and the backup machine are synchronized to prevent recovery from using --recovery-target-time, which may fail when starting gaussdb.
When remote backup is enabled (remote-proto=ssh), make sure -h and --remote-host specify the same machine. When the remote backup is invalid, if the -h option is specified, please make sure that -h specifies the local address or the local host name.
Currently, backup of logical replication slots is not supported.

Top comments (0)