Oracle Database Backup Service

Oracle Database Backup Service Backup de Banco de Dados On-Premise para Cloud Matheus Boesing Quem sou eu? • DBA Oracle Matheus Boesing @matheusdba...
6 downloads 1 Views 882KB Size
Oracle Database Backup Service Backup de Banco de Dados On-Premise para Cloud Matheus Boesing

Quem sou eu? • DBA Oracle

Matheus Boesing @matheusdba

− 8 anos − Infraestrutura/Plataforma

• Pythian

Oracle Database 12c Administrator Certified Professional (OCP)

• GrepOra.com

Oracle Database 11g Performance Tuning Certified Expert (OCE) Oracle Database SQL Certified Expert (OCE) Oracle Real Application Clusters 11g Certified Implementation Specialist (OCS) Oracle Database 11g Certified Implementation Specialist (OCS) Oracle Database 11g Administrator Certified Professional (OCP) Oracle Database 11g Administrator Certified Associate (OCA)

EXIN: Certified Integrator Secure Cloud Services EXIN: Cloud Computing Foundation EXIN: ITIL® Foundation Certificate in IT Service Management

EXIN: ISO/IEC 20000 – IT Service Management Foundation EXIN: ISO/IEC 27002 – Information Security Foundation EXIN: Green IT Citizen ISACA: COBIT 4.1 Foundation for IT Services Microsoft Technology Associate – SQL Server (MTA) GrepOra.com | [email protected]

Agenda • Contexto • Database Backup Service (ODBS): O que é? • Como funciona? • Quanto custa? • Como Instala? Como configura? Como faz um Backup? Funciona mesmo? (Demo) • Análise: Prós x Contras • Estratégias de Utilização

GrepOra.com | [email protected]

Qual o Contexto? • Backup Off-site de BD On-Premise − Sarbanes-Oxley Act (SOX) de 2002

• Fitas Magnética: VTL (D2T, D2D2T, MML + Vendor?)

• Qual o TCO? (Storage + Fitas + Transporte/Armazenamento + Solução VTL, …) $$$$$$$$ • Qual RPO? • Qual RTO??

L

Testes de Restore? Elasticidade? Falhas físicas? Custo Operacional Custo de Adesão ...

GrepOra.com | [email protected]

O que é? • Oracle PAAS - Complemento para Estratégia de Backup • Pode ser consumido por BD em Cloud e On-Premise

https://docs.oracle.com/en/cloud/paas/db-backup-cloud

GrepOra.com | [email protected]

Como Funciona? • ODBS -> Oracle Storage Cloud Service • RMAN -> Oracle Database Cloud Backup Module (ODCBM) – MML − Mantém todas as rotinas e scripts já existentes J

• É configurado automaticamente para DBAAS • Compression − High, Medium, Low, Basic, Normal

• Encryption − − −

Transparent Encryption of Backups: Oracle Wallet (TDE) Password Encryption of Backups: Palavra-Chave Dual Mode Encryption of Backups: Ambos

• Replicação tripla e transparente • Elasticidade: Pay-As-You-Go GrepOra.com | [email protected]

Quanto Custa? • Não Metrificado

GrepOra.com | [email protected]

Quanto Custa? • Metrificado

GrepOra.com | [email protected]

Quanto Custa? • Metrificado

GrepOra.com | [email protected]

Quanto Custa? • Metrificado

GrepOra.com | [email protected]

Quanto Custa? • Supondo um BD de 1TB… • Não-Metrificado: $33/TB/Mês. • Metrificado: $0,264/GB x 1TB = $26,40/TB/Mês. Mais Barato? • Metrificado - Transferência Outbound: $0,12/GB • Restore 1TB: $0,12 x 1TB = $120,00! − 4 meses Não-Metrificado

GrepOra.com | [email protected]

Como Instala? • Oracle Cloud Account • Download ODBCM: http://download.oracle.com/otn/other/opc_installer.zip • Instala ODCBM: [oracle@dbsrvr cloud]$ java -jar opc_install.jar -serviceName Storage -identityDomain grepora -opcId '[email protected]' -opcPass ’DBABrasil’ -walletDir /db/walletprfl libDir /db/libprfl -proxyHost "10.10.10.10" -proxyPort 6060 Oracle Database Cloud Backup Module Install Tool,

build 2016-02-04

Oracle Database Cloud Backup Module credentials are Oracle Database Cloud Backup Module wallet created in

valid. directory /db/walletprfl

Oracle Database Cloud Backup Module initialization file /u01/app/oracle/product/11.2/dbs/opccloudtest.ora created. Downloading Oracle Database Cloud Backup Module opc_linux64.zip.

Software Library from file

Downloaded 26933594 bytes in 6 seconds. Transfer rate Download

was 4488932 bytes/second.

complete.

GrepOra.com | [email protected]

Como Configura? RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; new RMAN configuration parameters are successfully

stored

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS='SBT_LIBRARY=/db/libprfl/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/11.2/dbs/opccloudtest.ora)'; new RMAN configuration parameters are successfully

stored

• Opcional -> Alocação Explicita RMAN> run{ ALLOCATE CHANNEL c1 DEVICE TYPE 'SBT_TAPE’ PARMS='SBT_LIBRARY=/db/libprfl/libopc.so, SBT_PARMS=(OPC_PFILE=/u01/app/oracle/product/11.2/dbs/opccloudtest.ora)'; ### Commandos RELEASE CHANNEL c1; } GrepOra.com | [email protected]

Faz um Backup aí! RMAN> SET ENCRYPTION ON IDENTIFIED BY "DBABrasil" only; executing

command: SET encryption

RMAN> backup datafile 1; Starting backup at 03-MAY-2017 19:25:05 using channel ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: starting full datafile backup channel ORA_SBT_TAPE_1: specifying datafile(s) in input datafile file number=00001

set

backup set

name=/db/u1001/teste/cloud_test/system01.dbf

channel ORA_SBT_TAPE_1: starting piece 1 at

03-MAY-2017 19:25:05

channel ORA_SBT_TAPE_1: finished piece 1 at

03-MAY-2017 19:31:10

piece handle=0or4mdgh_1_1 tag=TAG20170503T192505

comment=API Version 2.0,MMS Version 3.15.12.30

channel ORA_SBT_TAPE_1: backup set complete, elapsed channel ORA_SBT_TAPE_1: starting full datafile backup channel ORA_SBT_TAPE_1: specifying datafile(s) in

time: 00:06:05 set

backup set

including current control file in backup set including current SPFILE in backup set channel ORA_SBT_TAPE_1: starting piece 1 at

03-MAY-2017 19:31:11

channel ORA_SBT_TAPE_1: finished piece 1 at

03-MAY-2017 19:31:26

piece handle=0pr4mdru_1_1 tag=TAG20170503T192505

comment=API Version 2.0,MMS Version 3.15.12.30

channel ORA_SBT_TAPE_1: backup set complete, elapsed

time: 00:00:15

Finished backup at 03-MAY-2017 19:31:26

GrepOra.com | [email protected]

Onde está o Backup? RMAN>

list backup of datafile 1;

using target database control file instead of recovery

catalog

List of Backup Sets =================== BS Key

Type LV

Size

Device Type Elapsed Time

------- ---- -- ---------- ----------- -----------5

Full

229.25M

SBT_TAPE

BP Key:

5

Handle:

0sr4mdun_1_1 Media:

List of

Datafiles in backup set 1

Status: AVAILABLE

00:04:42

Compressed: YES

03-MAY-2017 19:31:10

grepora.storage.oraclecloud.com/v1/Storage-grepora/oracle-data-s

Ckp SCN

---- -- ----

---------- -------------------- ----

Full 1044828

--------------------

Tag: TAG20170503T192505

File LV Type 1

Completion Time

Ckp Time 03-MAY-2017 19:31:10

Name /db/u1001/teste/cloud_test/system01.dbf

GrepOra.com | [email protected]

Restore? RMAN> SET DECRYPTION IDENTIFIED BY "DBABrasil"; RMAN> restore datafile 1; Starting restore at 03-MAY-2016 20:00:58 using channel ORA_SBT_TAPE_1 using channel ORA_DISK_1 channel ORA_SBT_TAPE_1: starting datafile backup set channel ORA_SBT_TAPE_1: specifying datafile(s) to

restore

restore from backup set

channel ORA_SBT_TAPE_1: restoring datafile 00001 to /db/u1001/teste/cloud_test/system01.dbf channel ORA_SBT_TAPE_1: reading from backup piece

0sr4mdun_1_1

channel ORA_SBT_TAPE_1: piece handle=0sr4mdun_1_1

tag=TAG20160503T192505

channel ORA_SBT_TAPE_1: restored backup piece 1 channel ORA_SBT_TAPE_1: restore complete, elapsed Finished

time: 00:00:03

restore at 03-MAY-2016 20:01:02

GrepOra.com | [email protected]

Análise: Prós x Contras Item Suporte a Desastre Geolocalizado Necessita Transporte Físico de Backups Compressão de Backup Paralelismo Backup Garantia de Encrypt dos dados Offsite Solução de VTL (terceiro) Espelhamento de Backup Offsite Risco Falha Física - Fitas Custo de Adesão Tempo de Backup Recovery Time Objective (RTO) Recovery Point Objective (RPO) Teste de Backup Offsite

D2T Sim Sim Sim Não Não Sim Não Sim Elevado Médio Alto Alto Complexo

D2D2T Sim Sim Sim Sim Não Sim Não Sim Elevado Baixo Alto Alto Complexo

ODBS Sim Não Sim Sim Sim Não Triplo Não Baixo Relativo DBSize/Internet Link Baixo Simples

$ Atualização de Hardware p/ Backup

Sim

Sim

Não

Custo de Licenças de Terceiros Custo de Utilização de Hardware Custo - Elasticidade da Solução Tempo - Elasticidade da Solução

Sim Valor Total Elevado Elevado

Sim Valor Total Elevado Elevado

Não Apenas Utilizado Baixo Imediato

GrepOra.com | [email protected]

Estratégias de Utilização •

”Oracle Database Backup Cloud Service complements your existing backup strategy by providing an off-site storage location in the cloud.”

• Qual o tamanho do BD? Qual o tamanho do link? − − −

1Gb/s = 0,125 GB/s; 100GB (normal) = 13 minutos; 1TB = 2,2 horas. 100GB (basic) = 4,5 minutos; 1TB = 45 minutos. 100GB (high) = 1,5 minutos; 1TB = 15 minutos.

• Qual a estratégia de Backup Atual? Qual a janela de manutenção do BD? −

Pode ser realizado backup cold mensal, por exemplo?

• Utilização de DataGuard para Backup −

Com ou sem interrupção de sincronia

• Recursos Importantes: −

Compression, Block Change Tracking File, QoS (interface dedicada), Link de Internet GrepOra.com | [email protected]

Resumo! • ODBS para BD On-Premise: Solução integrada e complementar para backup offsite com baixo custo de adesão, elasticidade e modelo pay-asyou-go, cuja segurança é garantida pelo protocolo através de chave de criptografia independente dos arquivos de backup, com replicação automática e total transparência para processos e scripts pré-existentes. • Cuidados devem ser tomados quando ao modelo de contratação do serviço. • O principal gargalo é com o Link de Internet e componentes físicos relacionados.

GrepOra.com | [email protected]

2025 por Mark Hurd •

80% of all production apps will be in the cloud. “Today it’s about 25 percent”.



Two software-as-a-service (SaaS) suite providers will have 80% of the cloud enterprise application market.



100% of software development/testing efforts will be conducted in the cloud.



100% of enterprise data will be stored virtually in the cloud.



The enterprise cloud will be the most secure IT environment.

GrepOra.com | [email protected]