DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman...
Transcript of DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman...
![Page 1: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/1.jpg)
DB & VM Backup and Recovery
mag. Sergej Rožman; Abakus plus d.o.o.
The latest version of this document is available at:http://www.abakus.si/
![Page 2: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/2.jpg)
Real men don't use backups, they post their stuff on a
public ftp server and let the rest of the world make
copies.
Linus Torvalds
![Page 3: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/3.jpg)
Sistemi
DB & VMBackup and Recovery
mag. Sergej Rožmansergej.rozman abakus.si
![Page 4: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/4.jpg)
Sistemi
DB & VMBackup and Recovery
mag. Sergej Rožmansergej.rozman abakus.si
![Page 5: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/5.jpg)
Sistemi
DB & VMBackup and Recovery
mag. Sergej Rožmansergej.rozman abakus.si
![Page 6: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/6.jpg)
Abakus plus d.o.o.History
from 1992, ~20 employees
Applications:special (DB – Newspaper Distribution, FIS – Flight Information System)ARBITER – the ultimate tool in audit trailingAPPM - Abakus Plus Performance Monitoring Tool
Services:DBA, OS administration , programming (MediaWiki, Oracle)networks (services, VPN, QoS, security)open source, monitoring (Nagios, OCS, Wiki)
Hardware:servers, SAN storage, firewalls
Infrastructure:from 1995 GNU/Linux (18 years of experience !)Oracle on GNU/Linux: since RDBMS 7.1.5 & Forms 3.0 (before Oracle !)>20 years of experience with High-Availability !
![Page 7: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/7.jpg)
Abakus plus d.o.o. - Kranj
![Page 8: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/8.jpg)
Backup and Recovery Best Practices
Backup takes no time!no resources needed & no disk space;
Recover takes no time as well!no resources needed;
Copies are without errors and consistent;
Data is always available & always in view.
![Page 9: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/9.jpg)
Classic Full/Incremental Backup Model
backup takes long time(especially full)
restore takes even longer(full + n × incremental)
incremental backups not suitable for large files(DB, VMs)
I
I
I
I
I
I
F
I
>backup><restore<
Sat
Fri
Thu
Wed
Tue
Mon
SUN
Sat
...
...
server
![Page 10: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/10.jpg)
Status BoardFact DB VM Notes
BACKUP in no time no resources no disk space or no tape space
RECOVER in no time no resources
COPIES without errors consistent if done right
DATA always available with autoloader
always in view
![Page 11: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/11.jpg)
Tape vs. Disk drive
Tape
price:n×1000€ (drive) + <100€ / (cartridge)(LTO-6 native capacity 2.5 TB)
no future compatibility(new drive needed)
Is your data really on that tape?
high throughput, slow access time
Disk
price: >100€ / 3 TB SATA
guaranted future compatibility
WYSIWYG (if you see data, you can get data)
moderate througput, fast access time
![Page 12: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/12.jpg)
Status Board (using disks)Fact DB VM Notes
BACKUP in no time no resources no disk space
RECOVER in no time no resources
COPIES without errors with mirrored disks
consistent DATA always available
always in view
![Page 13: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/13.jpg)
DB Backup Full/Incremental – Example
I
I
I
I
I
I
Fcopy of DB
now
-1
-2
-3
-4
-5
-6
-7
I
incrementalbackup
I
recovercopy of database
somewhat optimizedno Full backup except initial
incremental backup optimized with Oracle Enterprise Edition(block change tracking)
restore still takes long time
DB server
LAG(history)
![Page 14: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/14.jpg)
Backup in »no time«
DB server backup server
archive logtransfer
backup serverbackup serverbackup server
production DB standby DB=
»backup DB«
backup takes no additional time
backup needs no production resources
BUT, WHERE IS BACKUP HISTORY ?
![Page 15: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/15.jpg)
… and history
backup serverbackup serverbackup serverbackup server
standby DB=
»backup DB«
snapshot backup DB
save snapshot
Time and resources are consumed exclusively on backup server
Backup occupies a lot of disk space !?(n × size of DB)
now
-1
-2
-3
-4
I
-6
-5
...
![Page 16: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/16.jpg)
Deduplication
dedupedstoragecurrent DB
a day old DB
+1 2 3 4 5 6 7 8 9
1101112
15 8
113
124
13
7
9610
2
15 8
113
124
13
7
9610
2
15 8
113
124
13
7
9610
2
![Page 17: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/17.jpg)
… and (almost) no disk space
backup serverbackup serverbackup serverbackup server
standby DB=
»backup DB«
snapshot backup DB
save snapshotto deduplicated area
Example:DB size 1 TB1% changed/added data per day (~10 GB)~200 days backup fits on 3 TB disk drive*
* not entirely true, did not consider archived logs
now
-1
-2
-3
-4
I-5
...
dedupedstorage
![Page 18: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/18.jpg)
Status BoardFact DB VM Notes
BACKUP in no time no resources no disk space dedupe plays well on VMs too
RECOVER in no time no resources
COPIES without errors consistent
DATA always available always in view
![Page 19: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/19.jpg)
Recover in »no time«
DB server backup serverbackup serverbackup serverbackup server
production DB standby DB=
»backup DB«
Lost or currupted datafile (or even whole DB)
make snaphot of backup DB
start SAN software – iSCSI, SRP, …
export LUN with backup of lost datafile
connect LUN to DB server
offline corrupted datafile
switch to backup datafile
recover backup datafile
online backup datafile
BACK IN BUSINESS IN NO TIME!*
* real restore in more appropriate time
connect toremote datafile
![Page 20: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/20.jpg)
Performance
test 1 (notebook with SSD, DB on VM):max_iops = 9.983, latency = 8, max_mbps = 251
test 2 (test DB, 10x 600 GB 15k FC):max_iops = 1.824, latency = 11, max_mbps = 280
test 3 (production DB, 30x 146 GB 15k FC):max_iops = 6.498, latency = 10, max_mbps = 455
test 4 (Abakus SAN, 16x SSD, Infiniband 40G):max_iops = 43.782, latency = 0, max_mbps = 1.727
![Page 21: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/21.jpg)
Restore/Access to Historical Data
snapshot selected slot
stop standby database
switch active slot to snapshot
start instance
recover database until needed (optional)
open database
-24
-v
-23-22
-12-11
now
-14
backup server
-21
-w
-13-13
-x -y
-1 -2 -4-3
backup historyinstance
![Page 22: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/22.jpg)
Status BoardFact DB VM Notes
BACKUP in no time no resources no disk space
RECOVER in no time no resources
COPIES without errors consistent
DATA always available always in view
![Page 23: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/23.jpg)
Work in Progress
general change block tracking at block device level(asynchronous and buffered)
will copy ONLY changed disk blocks to backup
suitable for VMs
will make possible to back up to remote site over slow link
no active instance – no license fee
point in time recovery for VMs, (maybe)
graphical user interface, (maybe)
![Page 24: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/24.jpg)
Status BoardFact DB VM Notes
BACKUP in no time no resources no disk space
RECOVER in no time no resources
COPIES without errors consistent
DATA always available always in view
![Page 25: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/25.jpg)
Guidelines
Open design, »everything is possible«.No automatic protection from »failure by design«. Plan cerefully!
Can not have everything
remote back up is preferred, but makes restore more difficult
on line backups can be compromised (viruses, sabotage).
Offline backups are still crucial for archival purposes(and if everything else fails).
Test procedures regularly!
![Page 26: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/26.jpg)
References
Husnu Sensoy;How to Backup & Recovery Enormous Databases?(http://husnusensoy.files.wordpress.com/2009/12/enormous.pdf)
![Page 27: DB & VM Backup and Recovery - Abakus plus€¦ · DB & VM Backup and Recovery mag. Sergej Rožman sergej.rozman abakus.si. Abakus plus d.o.o. History from 1992, ~20 employees Applications:](https://reader033.fdocuments.net/reader033/viewer/2022060404/5f0f02b57e708231d4420aef/html5/thumbnails/27.jpg)
DB & VM Backup and Recovery
Questionsmag. Sergej RožmanABAKUS plus d.o.o.Ljubljanska c. 24aKranj
e-mail: sergej.rozman abakus.rs
phone: +386 4 287 11 14