1. Home
  2. Docs
  3. Backup Ninja
  4. User Guide
  5. Backups
  6. Point-in-time Recovery (PITR) backups

Point-in-time Recovery (PITR) backups

Point-in-time Recovery (PITR) provides safety and assurance in addition to a full backup. With a PITR backup, you can perform a recovery based on a given point in time. For example, you have a full backup copy and wants to restore it to the target node. Once the full backup has been restored, PITR backup can bring those recently modified changes that were recently applied from the based copy of your backup. It brings your target server up to date incrementally from the time of the full backup to a more recent time. This is how PITR plays its role and how it is important.

PITR in Backup Ninja is only available for the following backup method supported:

  • PostgreSQL
    • pg_basebackup
      • Allows you to take a full backup and enable/disable PITR
      • requires the following variables has to be set as follows:
        • archive_mode must be set to “on”
        • archive_command should be just copy, no gzip or other modification of wal files eg. “test ! -f /tmp/wal/%f && cp %p /tmp/wal/%f”
        • wal_level must be at least “replica”
        • max_wal_senders must be > 0
  • MySQL/MariaDB/Percona Server
    • mysqldump
      • Allows you to filter by schema/database and/or exclude the tables you wanted to filter. Filtering a table has to be a <database_name>.<table_name> format. Allows you to enable/disable PITR
      • requires the following variables has to be set as follows:
        • Enabling Binary Logging for MySQL
        • server-id must be specified, otherwise the server is not allowed to start. Set unique replication ID in the range from 1 to 4294967295.(eg.: server-id = 1)
        • set log_bin as the path that should be used as Binary Logs Location.(eg.: log_bin = /var/log/mysql/mysql-bin.log)
        • restart MySQL server.

 

 

 

 

Was this article helpful to you? Yes No