Alternative backup methodsΒΆ
Because full backup files are extremely large and intended for use in disaster reovery scenarios, saving and storing backup files to remote hosts serving ssh is highly recommended.
In scenarios where this is not possible, the following alternative backup methods can be used:
- Backup to a second Plixer Scrutinizer instance
If a separate host is not available to save backups to, a second Plixer Scrutinizer instance can be used for backup file storage instead. The versions of the two instances must match.
Important
Due to how Plixer Scrutinizer is designed to optimize the use of all available disk space, it will likely be necessary to add more storage and/or modify the data retention settings of the second instance. For assistance, contact Plixer Technical Support.
#!/bin/bash # Set up remote backups between two Scrutinizer instances at the default # location. BACKUPDIR=${BACKUPDIR:='/var/db/big/pgsql/restore'} REMOTE=YOUR_REMOTE_SCRUTINIZER_INSTANCE # Install sshfs on both instances sudo yum -y install sshfs ssh plixer@$REMOTE "sudo yum -y install sshfs" # Create the Backup Directory on both instances sudo mkdir -p $BACKUPDIR sudo chown plixer:plixer $BACKUPDIR ssh plixer@$REMOTE "sudo su -c 'mkdir -p $BACKUPDIR && chown plixer:plixer $BACKUPDIR'" # Allow other users to use FUSE mounts sudo grep -Eq "^user_allow_other" /etc/fuse.conf || \ sudo sed -i '$ a user_allow_other' /etc/fuse.conf # Mount the remote instance's backup directory on the local instance sshfs -o allow_other -o reconnect plixer@$REMOTE:$BACKUPDIR $BACKUPDIR
To unmount the remote Plixer Scrutinizer after the backup is complete:
#!/bin/bash BACKUPDIR=${BACKUPDIR:='/var/db/big/pgsql/restore'} fusermount -u $BACKUPDIR
- Local backup
By default, both
backup.sh
andrestore.sh
are set to use/var/db/big/pgsql/restore
on the local Plixer Scrutinizer filesystem for full backup files.Note
In v19.2, the backup file path must be defined in the
backup.sh
andrestore.sh
scripts before they are run.In most cases, however, the backup operation will likely fail unless additional disk space is allocated to or created on the Plixer Scrutinizer instance. Running the command
df -h /var/db | awk '!/^Filesystem/ {print "Space Required: "$3}'
will provide a rough estimate of the storage required for the backup.Important
Storing backup files locally will severely limit the storage Plixer Scrutinizer can use for its primary functions. As such, backup files saved to the instance should be transferred to a separate resource as soon as possible.
To force a checkpoint, enter
psql plixer -c "CHECKPOINT"
after the script has finished running.