Schedule YSQL data backups
You can use YugabyteDB Anywhere to perform regularly scheduled backups of YugabyteDB universe data for all YSQL tables in a namespace.
To back up your universe YSQL data immediately, see Back up universe YSQL data.
Create a scheduled backup policy
Before scheduling a backup of your universe YSQL data, create a policy, as follows:
Navigate to Universes.
Select the name of the universe for which you want to schedule backups.
Select the Tables tab and click Actions to verify that backups are enabled. If disabled, click Enable Backup.
Select the Backups tab and then select Scheduled Backup Policies.
Click Create Scheduled Backup Policy to open the dialog shown in the following illustration:
Provide the backup policy name.
Select the backup storage configuration. Notice that the contents of the Select the storage config you want to use for your backup list depends on your existing backup storage configurations. For more information, see Configure backup storage.
Select the database to backup. You may also choose to back up all databases associated with your universe.
Specify the period of time during which the backup is to be retained. Note that there's an option to never delete the backup.
Specify the interval between backups or select Use cron expression (UTC).
Enable Take incremental backups within full backup intervals to instruct the schedule policy to take full backups periodically and incremental backups between those full backups (YBA version 2.16 or later, and YugabyteDB version 2.16 or later only). The incremental backups intervals must be shorter than the full scheduled backup frequency:
If you disable the full backup, the incremental backup stops. If you enable the full backup again, the incremental backup schedule starts on new full backups.
If you delete the main full backup schedule, the incremental backup schedule is also deleted.
You cannot modify any incremental backup-related property in the schedule; to overwrite any incremental backup property, you have to delete the existing schedule and create a new schedule if needed.
Specify the number of threads that should be available for the backup process.
Subsequent backups are created based on the value you specified for Set backup intervals or Use cron expression.
You can disable all backups, including scheduled ones, as follows:
- Navigate to the universe's Tables tab.
- Click Actions > Disable Backup.
Delete a scheduled backup
You can permanently remove a scheduled backup, as follows:
- Navigate to the universe's Backups tab.
- Find the scheduled backup in the Backups list and click ... > Delete Backup.
To delete a policy, select Scheduled Backup Policies, find the policy and click its Actions > Delete Policy.