Vertica Full Backup vs Incremental Backup
search cancel

Vertica Full Backup vs Incremental Backup

book

Article ID: 282612

calendar_today

Updated On: 04-26-2024

Products

Network Observability

Issue/Introduction

I understand Vertica supports incremental backup, and I have set it up, but I do not see incremental backups happening; it's always backup type full.

Command Used:
/opt/vertica/bin/vbr.py -t listbackup -c /test/testbackup_snapshot.ini

List of Backups:
--------------------------------------------------------------------------------------------------------------
| Backup Name             | Backup Type | Epoch      | Objects   | Include Patterns | Exclude Patterns | Nodes (Hosts)          | Version     | File System Type |
--------------------------------------------------------------------------------------------------------------
| backup_snapshot_20240420_074014 | full        | 37779837 | v_drdata_node0001(xxx.xxx.xxx.xxx), v_drdata_node0002(xxx.xxx.xxx.xxx), v_drdata_node0003(xxx.xxx.xxx.xxx) | v10.1.1-20 | [Linux]          |
| backup_snapshot_20240401_102823 | full        | 37685560 | v_drdata_node0001(xxx.xxx.xxx.xxx), v_drdata_node0002(xxx.xxx.xxx.xxx), v_drdata_node0003(xxx.xxx.xxx.xxx) | v10.1.1-20 | [Linux]          |
| backup_snapshot_20230407_052145 | full        | 28405154 | v_drdata_node0001(xxx.xxx.xxx.xxx), v_drdata_node0002(xxx.xxx.xxx.xxx), v_drdata_node0003(xxx.xxx.xxx.xxx) | v9.1.1-5   | [Linux]          |
| backup_snapshot_20220112_100530 | full        | 16274398 | v_drdata_node0001(xxx.xxx.xxx.xxx), v_drdata_node0002(xxx.xxx.xxx.xxx), v_drdata_node0003(xxx.xxx.xxx.xxx) | v9.1.1-5   | [Linux]          |
--------------------------------------------------------------------------------------------------------------

Observation:

- All listed backups are of type full, indicating that incremental backups are not being performed. Could you explain ?

Environment

DX NetOps All Releases 

Cause

When a full backup already exists, vbr backs up new or changed data since the last full backup occurred, rather than making another complete copy. You can specify the number of historical backups to keep.

Resolution

Full Backups vs Incremental Backups: Vertica's Unique Approach
 
1.In traditional backup systems, there are usually two types: full backups and incremental backups. However, in Vertica, things work a bit differently. Let's delve into Vertica's backup strategy:
  • Full Backup with vbr:

    • Vertica's backup utility (vbr) performs what it calls a "full backup."
    • But here's the twist: When vbr runs a full backup and a previous full backup already exists, it doesn't duplicate everything. Instead, it only captures the new or changed data since the last full backup.
    • This means that although Vertica labels it as a "full backup," it's functionally more like an incremental backup, capturing only the differences since the last full backup.
  • Understanding listbackup Output:

    • When you use the listbackup command, it might display a backup as "full" even if it's not duplicating all files.
    • This can be misleading, but it's essential to understand that Vertica's full backups are actually incremental, only copying the changes since the last full backup.
2. Point-in-Time Backup and Restore: Adding a Time Travel Feature
 
Vertica offers a powerful feature called point-in-time backup and restore. Here's how it works:
  • restorePointLimit Parameter:

    • This parameter determines how far back in time you can go to restore your database.
    • For example, if you set restorePointLimit to 30 and run daily backups, you can roll back your database to any state within the last 30 days.
  • Using the --archive Parameter for Point-in-Time Restore:

    • Let's say you want to restore your database to its state on March 19, 2024.
    • You can achieve this by using the --archive parameter while calling the restore command and specifying the appropriate date (e.g., 20240319_xyz).
    • You can utilize the listbackup command to list all backups and get the correct backup name for the desired date.
3. Configuring Backup Strategies: Daily and Monthly Approach - This is just an example
 
To optimize your backup strategy, you can create different configurations for daily and monthly backups:
  • Daily Backups:

    • Use a configuration file for daily backups with the default restorePointLimit (usually set to 1).
    • Run this configuration once a day to capture incremental changes.
    • This setup ensures that you have recent backups to restore from in case of any issues.
  • Monthly Full Backups:

    • Create a separate configuration file for monthly full backups.
    • Set restorePointLimit to a higher value, like 12, to retain monthly snapshots.
    • Running this configuration once a month ensures that you have comprehensive point-in-time backups for each month.
In Summary:
  • 1st Backup: Full backup
  • 2nd Backup: Incremental (only capturing changes since the last backup)
  • Subsequent backups: Incremental, irrespective of being labeled as "full."

Additional Information