Data backups and restores
nzbackup command
Warning: Replication should be suspended while performing synchronized backup.
The message indicates that replication is still active on the node. If it is a primary node, it might continue to process write transactions. This would make the resulting backup, if you use it to restore to a replica, out of sync with the primary. You can either suspend the primary before running the nzbackup command or use the nzreplbackup command, which suspends the primary as part of the command execution. You can ignore the message if you are backing up the database for non-replication purposes or if you can guarantee that no changes will be made to the replicated databases.
If the message is received on a replica, it indicates that you must suspend the replica to ensure consistency. You might want to take regular backups from the replica, for example, to avoid taking the primary offline for workload processing.
If you take an incremental backup on the primary, by using the -nzbackup command with the -cumulative or -differential option, you cannot apply the backup on the replica.
nzrestore command
Warning: User and group creation is skipped when restoring to a replication replica node, or to a non-replicated database on a primary node.
The message indicates that users and groups are not included in the restore of the database. This is because users and groups are part of the “globals” database in replication.
Error: DB SQL 'set enable_restore_mode=1;set enable_dsid_joins=1;set replicawrite=1;set serializable=0;' failed - DB error - ERROR: SET REPLICAWRITE TO ON requires replication to be suspended.
To restore a replicated database on a replica node by using the nzrestore command, you must first suspend replication on the replica node and then run the nzrestore command. To change the activation state of the node, use the ALTER REPLICATION NODE command. You cannot use this command to change the state when replication suspension results from the “master continue on error” feature. The error details reflect internal replication settings.
Additional considerations
The NPS nzhostbackup command is incompatible with the replication disaster recovery solution because the command restores the primary host to a previous point in time but the replicas might have processed newer transactions. This results in a fork situation. Instead of using the nzhostbackup command if the primary node is corrupted, promote a replica to the primary role and recover the corrupted node from the new primary.