Understanding Snapshot IDs vs Restoration IDs Jim KnicelyDecember 21, 2025 When working with YugabyteDB YSQL snapshots, it’s common to see two different UUIDs and wonder:❓ Which snapshot did I restore?❓ What is this restoration UUID used for?❓ How do I see details of a restore operation? This tip walks through a complete, end-to-end example:1. Create data2. Take multiple snapshots3. Restore a snapshot4. Correlate Snapshot UUIDs ↔ Restoration UUIDs5. Verify the restore 🧠 Key Concept (TL;DR) UUID Type What it Represents Snapshot UUID The snapshot artifact (point-in-time copy of data). Restoration UUID A restore operation that applies a snapshot (each restore generates a new UUID). 👉 Each restore creates a new Restoration UUID, even if you restore the same snapshot multiple times. 🧪 Step 0: Setup Variables export YB_HOME=/root/yugabyte-2025.2.0.0 export YB_MASTER="127.0.0.1:7100" 🧪 Step 1: Create a Test Table CREATE TABLE north_pole_accounts ( id INT PRIMARY KEY, name TEXT, gift_count INT ); Insert some festive sample data: INSERT INTO north_pole_accounts VALUES (1, 'Santa Claus', 1000000), (2, 'Mrs. Claus', 500000), (3, 'Rudolph', 250000), (4, 'Dasher', 200000), (5, 'Blitzen', 200000); Verify: SELECT * FROM north_pole_accounts ORDER BY id; Example: yugabyte=# SELECT * FROM north_pole_accounts ORDER BY id; id | name | gift_count ----+-------------+------------ 1 | Santa Claus | 1000000 2 | Mrs. Claus | 500000 3 | Rudolph | 250000 4 | Dasher | 200000 5 | Blitzen | 200000 (5 rows) 📸 Step 2: Take the First Snapshot $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ create_database_snapshot ysql.yugabyte Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ create_database_snapshot ysql.yugabyte Started snapshot creation: 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 This UUID is the Snapshot UUID. ✏️ Step 3: Modify Data and Take Another Snapshot Update the data: UPDATE north_pole_accounts SET gift_count = gift_count - 10000 WHERE name = 'Santa Claus'; Take a second snapshot of the database: $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ create_database_snapshot ysql.yugabyte Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ create_database_snapshot ysql.yugabyte Started snapshot creation: 751cad5d-3d71-4d0f-92eb-4945d459a5fe 📋 Step 4: List All Snapshots $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshots Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshots Snapshot UUID State Creation Time 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 COMPLETE 2025-12-21 23:36:02.687373 751cad5d-3d71-4d0f-92eb-4945d459a5fe COMPLETE 2025-12-21 23:40:10.805329 No snapshot restorations 🔄 Step 5: Restore a Snapshot Restore the first snapshot (before Santa’s gift count changed): $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ restore_snapshot 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ restore_snapshot 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 Started restoring snapshot: 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 Restoration id: 3a837c02-01b5-4f08-a6b4-7c51103b10c8 🎯 This UUID is the Restoration UUID. 📋 Step 6: List Snapshots Again (Notice Restorations) $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshots Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshots Snapshot UUID State Creation Time 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 COMPLETE 2025-12-21 23:36:02.687373 751cad5d-3d71-4d0f-92eb-4945d459a5fe COMPLETE 2025-12-21 23:40:10.805329 Restoration UUID State 3a837c02-01b5-4f08-a6b4-7c51103b10c8 RESTORED What this tells us: ● Two Snapshot UUIDs exist:○ 8ecc6226-e5f2-4111-b8eb-e115b5f104a8○ 751cad5d-3d71-4d0f-92eb-4945d459a5fe● One restore operation has occurred:○ Restoration UUID 3a837c02-01b5-4f08-a6b4-7c51103b10c8 At this point, it is not yet obvious which snapshot was restored. 🔍 Step 7: Correlate Restoration UUID → Snapshot UUID This is the most important command in this tip. $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshot_restorations \ 3a837c02-01b5-4f08-a6b4-7c51103b10c8 Example: [root@localhost ~]# $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshot_restorations \ 3a837c02-01b5-4f08-a6b4-7c51103b10c8 { "restorations": [ { "id": "3a837c02-01b5-4f08-a6b4-7c51103b10c8", "snapshot_id": "8ecc6226-e5f2-4111-b8eb-e115b5f104a8", "state": "RESTORED" } ] } ✅ This explicitly shows:● Which snapshot was restored● The final state of the restore operation 📋 Step 8: List All Restorations (Optional) $YB_HOME/bin/yb-admin \ --init_master_addrs "$YB_MASTER" \ list_snapshot_restorations This is useful when:● Multiple restores have been performed● You are auditing operational history● You are investigating failed restores ✅ Step 9: Verify the Restored Data SELECT * FROM north_pole_accounts; You should see data exactly as it existed at the time snapshot 8ecc6226-e5f2-4111-b8eb-e115b5f104a8 was taken. Example: yugabyte=# SELECT * FROM north_pole_accounts ORDER BY id; id | name | gift_count ----+-------------+------------ 1 | Santa Claus | 1000000 2 | Mrs. Claus | 500000 3 | Rudolph | 250000 4 | Dasher | 200000 5 | Blitzen | 200000 (5 rows) ⚠️ Important Notes & Gotchas ● YSQL snapshots are database-level only● Table-level snapshots are not supported for YSQL● Restoration UUIDs are informational○ They are not reused○ They are not passed into restore_snapshot● Each restore generates a new Restoration UUID● Restoration UUIDs are essential for auditing and troubleshooting 📚 Reference YugabyteDB yb-admin backup and snapshot commands 🎯 Summary ● Snapshot UUID = the stored point-in-time database snapshot● Restoration UUID = a restore operation● Use list_snapshot_restorations to correlate restores to snapshots● YSQL snapshots operate at the database level● Each restore is tracked independently for observability Have Fun!