Alternative backup methods

Because full backup files are extremely large and intended for use in disaster recovery 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.

The following instructions cover the additional steps required for creating backups on a second Plixer Scrutinizer instance (using the default location):

  1. Set the location/directory to use for backup files:

    #!/bin/bash
    BACKUPDIR=${BACKUPDIR:='/var/db/big/pgsql/restore'}
    REMOTE=YOUR_REMOTE_SCRUTINIZER_INSTANCE
    
  2. 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'"
    
  3. 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
    
  4. Mount the remote instance’s backup directory on the local instance:

    sshfs -o allow_other -o reconnect plixer@$REMOTE:$BACKUPDIR $BACKUPDIR
    
  5. Run backup.sh using the directory mounted from the remote instance as the backup file location:

    BACKUPDIR=/var/db/big/pgsql/restore ~plixer/scrutinizer/files/backup.sh
    

    Important

    Before running the backup utility, verify that the remote directory to be used is empty and there is sufficient storage available. For a rough estimate of the backup file size, run the command df -h /var/db | awk '!/^Filesystem/ {print "Space Required: "$3}' on the Plixer Scrutinizer instance.

  6. After the backup is complete, unmount the remote Plixer Scrutinizer directory:

#!/bin/bash
BACKUPDIR=${BACKUPDIR:='/var/db/big/pgsql/restore'}
fusermount -u $BACKUPDIR

Local backups

By default, both backup.sh and restore.sh are set to use /var/db/big/pgsql/restore on the local Plixer Scrutinizer filesystem for full backup files. However, in most cases, 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.

To force a checkpoint, enter psql plixer -c "CHECKPOINT" after the script has finished running.

Note

  • In v19.2, the backup file path must be defined in the backup.sh and restore.sh scripts before they are run.

  • 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.