SlideShare a Scribd company logo
MongoDB Backups and PITR
Igor Donchovski
May-23-2023
© Pythian Services Inc 2023 | Confidential|
About me
---
Name: Igor Donchovski
Company: Pythian
Email: donchovski@pythian.com
Current_Role: Principle Consultant
Education:
- Type: Master
Name: FINKI
Graduated: 2013
University: UKIM
Certificates:
- MongoDB: C100DBA
- Oracle:
- MySQL 5.7 Professional
- OCI Foundations Associate
- HashiCorp: Terraform Associate (002)
- Google: PCA
Social:
- Network: LinkedIn
url: https://mk.linkedin.com/in/igorle
- Network: Twitter
url: https://twitter.com/igorle
© Pythian Services Inc 2023 | Confidential | 2
25
Years in Business
450+
Experts across every Data Domain & Technology
400+
Global Customers
_______________
Gold Partner
40+ Certifications
5 Competencies,
Incl. Data Analytics
and Data Platform
_______________
Silver Partner
50+ Certifications
Migration Factory
Certified Apps
Hosting
_______________
Advanced Partner
1O0+ Certs/Accreds
Migration & DevOps
Competencies
Pythian overview
________________
Premier Partner
120+ Certs/Creds
6 Specializations, MSP
Badge, Partner &
Technical Advisory Bds
Pythian maximizes the value of your data estate by delivering advanced on-prem, hybrid, cloud, and
multi-cloud solutions and solving your toughest data and analytics challenges.
_______________
Select Partner
10+ Certs/Accreds
_______________
Platinum Partner
60+ Certifications
Advisory Board
Member
© Pythian Services Inc 2023 | Confidential | 3
Overview
• Why Backups
• RTO and RPO
• Types of backups
• MongoDB specifics
• PITR
• ChatGPT feedback
• QA
© Pythian Services Inc 2023 | Confidential | 4
Why Backups
© Pythian Services Inc 2023 | Confidential | 5
Why Backups
© Pythian Services Inc 2023 | Confidential | 6
High Availability
Disast r Re ov ry
Scalability
Elasticity
Auto ation
Performance
● Power outage
● Software issues
● Hardware failure
● User error
● Network outages
● Natural disaster
● Other
Why Backups
© Pythian Services Inc 2023 | Confidential | 7
High Availability
Scalability
Elasticity
Disast r Re ov ry
Performance
● RTO - recovery time objective
○ How long it will take to recover?
● RPO - recovery point objective
○ How much data can we lose?
Why Backups
© Pythian Services Inc 2023 | Confidential | 8
TIME
Disaster
RTO
RPO
LOST DATA DOWNTIME
Types of Backups
© Pythian Services Inc 2023 | Confidential | 9
Types of Backups
Logical
• Easy to implement
• Human readable
• Slow for larger dataset
• Might affect database performance
• mongodump (Binary export. Does not contain the index data)
• mongoexport (json or csv export for collection)
• Works with Replica sets and Sharded clusters
© Pythian Services Inc 2023 | Confidential | 10
Types of Backups
Physical
• Moderate to implement
• Cold or hot
• Filesystem copy (cp, rsync)
• LVM Snapshot
• Cloud based disk snapshot
• Percona backup for MongoDB
• MongoDB Cloud manager or Ops manager
© Pythian Services Inc 2023 | Confidential | 11
● Sharded clusters
● Replica sets
Types of Backups - MongoDB
© Pythian Services Inc 2023 | Confidential | 12
● Replica sets
Types of Backups - MongoDB
© Pythian Services Inc 2023 | Confidential | 13
● Sharded clusters
Logical Backups
© Pythian Services Inc 2023 | Confidential | 14
Logical Backup
• mongodump
mongodump --host mongodb1.example.net --port 27017 --username user --password pass --oplog
--out /backup/mongodump-2023-05-23
Optional
--db Specifies the database to backup. Does not work with --oplog
--collection Specifies the collection to backup
--query Limits the documents returned in the output
--gzip Compresses the output
--numParallelCollections=N (No of collections to export in parallel. Default to 4)
• mongorestore
mongorestore --host mongodb1.example.net --port 27017 --username user --password pass
--OplogReplay --oplogLimit <timestamp> /backup/mongodump-2023-05-23
© Pythian Services Inc 2023 | Confidential | 15
Logical Backup
• mongoexport
mongoexport --host mongodb1.example.net --port 27017 --username user --password pass --db
marketing --collection contacts --out /backups/contacts.json
Optional
--csv Changes the export format to CSV
--fields Specifies a field or fields to include in the export
--query Limits the documents returned in the output
• mongoimport
mongoimport --host mongodb1.example.net --port 27017 --username user --password pass --db
marketing --collection contacts --file /backups/contacts.json
© Pythian Services Inc 2023 | Confidential | 16
Physical Backups
© Pythian Services Inc 2023 | Confidential | 17
Physical Backups
● Run on a Secondary node for replica set (Hidden, Delayed)
● Lock the database for writes
> db.fsyncLock()
● Take backup from the disk[s] relevant for mongo
● Grab the latest oplog position (optional)
● Unlock the database for writes
> db.fsyncUnlock()
● Copy the backup to offsite location
© Pythian Services Inc 2023 | Confidential | 18
Physical Backups
Filesystem copy (cp, rsync)
● Stop mongod process
● Rsync or cp the files to external location
$ rsync -av --partial --inplace --append --progress
user@mongodb1.example.net:/backups/mongodb
● Start mongod process
● Might take a while for large datasets
© Pythian Services Inc 2023 | Confidential | 19
Physical Backups
LVM snapshot
● Hot backup on running mongod
> db.fsyncLock()
lvcreate -L5G -s -n mongosnap_23may2023 /dev/vgdiskdata/lvmongo
➔ /dev/vgdiskdata/lvmongo - Logical volume path
➔ lvmongo - LV Name
➔ -L Size of the snapshot
➔ -s It’s a snapshot
➔ -n Name for the snapshot
© Pythian Services Inc 2023 | Confidential | 20
Physical Backups
LVM snapshot
mkdir /tmp/mongosnap
mount -t xfs -o nouuid,ro /dev/vgdiskdata/mongosnap_23may2023 /tmp/mongosnap/
> db.fsyncUnlock()
tar -czf /backups/mongodb_backup_$(date '+%Y%m%d%H%M').tar.gz --absolute-names
/tmp/mongosnap
umount /tmp/mongosnap
lvremove /dev/vgdiskdata/mongosnap_23may2023
© Pythian Services Inc 2023 | Confidential | 21
Physical Backups
Cloud based disk snapshot
AWS
aws ec2 create-snapshot --volume-id VOLUME-ID --description "This is my mongo
volume snapshot"
GCP
gcloud compute snapshots create SNAPSHOT_NAME --source-disk SOURCE_DISK
--source-disk-zone SOURCE_DISK_ZONE
Azure
az snapshot create -g ResourceGroup --source MONGO-DISK-ID --name mongoDisk-bak
© Pythian Services Inc 2023 | Confidential | 22
Physical Backups
Percona backup for MongoDB
● Logical and physical backups and restores
● Selective logical backups and restores with PITR
● Works for both sharded clusters and non-sharded replica sets
● Can be used with any S3-compatible storage
● Support for Microsoft Azure Blob storage
● Supports filesystem storage type for locally mounted remote filesystem
backup servers
© Pythian Services Inc 2023 | Confidential | 23
Physical Backups
PBM Architecture
● pbm-agent is a process running on every mongod node within the cluster or a replica
set that performs backup and restore operations
● pbm CLI is a command-line utility that instructs pbm-agents to perform an operation
● PBM Control collections are special collections in MongoDB that store the
configuration data and backup states
● Remote backup storage as either s3-compatible or filesystem type storage
pbm backup --type=logical|physical --compression=gzip
© Pythian Services Inc 2023 | Confidential | 24
Physical Backups
MongoDB Cloud manager backup
© Pythian Services Inc 2023 | Confidential | 25
Physical Backups
MongoDB Cloud manager backup
● Requires monthly subscription based on snapshot size, schedule, and retention policy
● Install the backup agent and configure in cloud.mongodb.com
● Optional namespace filter to exclude collections from the backup
● Point in time recovery with low overhead
● Data transfer to Cloud manager datacenters is encrypted
● Stores at least 3 copies of your data in at least 2 geographic locations to ensure
redundancy
● Only works with deployments of up to 100k collections
● Snapshot lowest frequency of 6 hours
© Pythian Services Inc 2023 | Confidential | 26
Physical Backups
MongoDB Ops manager backup
● Must run with MongoDB enterprise
● Works with deployments of up to 100k
collections
● Replica set, sharded cluster, and shard
names within the same project must be
unique
© Pythian Services Inc 2023 | Confidential | 27
PITR
© Pythian Services Inc 2023 | Confidential | 28
PITR
© Pythian Services Inc 2023 | Confidential | 29
TIME
RTO
LOST DATA DOWNTIME
Full backup
RPO
Disaster
PITR
Incremental backups
© Pythian Services Inc 2023 | Confidential | 30
TIME
RTO
Full backup LOST DATA DOWNTIME
Inc backup
Disaster
PITR
Incremental backups
● RPO ~ 0
© Pythian Services Inc 2023 | Confidential | 31
TIME
RTO
Full backup LOST
DATA
DOWNTIME
Inc 1 Inc 2 Inc 3 Inc n
Disaster
PITR
Full backup: lvm snapshot + Incremental backups using the Oplog
root @mongodb: ~# mongo - u < username > -p < password > --port < port > --quiet backup_oplog_ts.js > oplog_position
cat backup_oplog_ts.js
var local = db.getSiblingDB('local');
var last = local['oplog.rs'].find().sort({
'$natural': -1
}).limit(1)[0];
var result = {};
if (last != null) {
result = {
position: last['ts']
};
}
print(JSON.stringify(result));
© Pythian Services Inc 2023 | Confidential | 32
TIME
Full backup
"$timestamp": {"t": 1666355398,"i": 1}
PITR
Oplog backup using mongodump
Inc 1 start position
{"position": {"$timestamp": {"t": 1666355398,"i": 1}}}
mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase = admin - d local - c oplog.rs --query='{"ts": {
"$gt": {"$timestamp":{"t":1666355398,"i":1}}}}' -o/backups/mongo_20230523/incremental_1
Inc 2 start position (end of Inc 1)
bsondump --quiet /backup/mongo_20230523/incremental_1/local/oplog.rs.bson | tail -1 | jq -c .ts
{"$timestamp": {"t": 1666616998, "i": 1 }}
© Pythian Services Inc 2023 | Confidential | 33
TIME
Full backup
Inc 1
PITR
Inc 2
{"position": {"$timestamp": {"t": 1666616998,"i": 1}}}
mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase=admin -d local -c oplog.rs --query='{"ts": { "$gt":
{"$timestamp":{"t":1666616998,"i":1}}}}' -o /backups/mongo_20230523/incremental_2
Inc 3 start position (end of Inc 2)
bsondump --quiet/backup/mongo_20230523/incremental_2/local/oplog.rs.bson | tail -1 | jq -c .ts
{"$timestamp": {"t": 1666617939,"i": 1}}
© Pythian Services Inc 2023 | Confidential | 34
TIME
Full backup
Inc 1 Inc 2 Inc 3 Inc n
PITR
Inc 3
{"position": {"$timestamp": {"t": 1666617939,"i": 1}}}
mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase=admin -d local -c oplog.rs --query='{"ts": { "$gt":
{"$timestamp":{"t":1666617939,"i":1}}}}' -o /backups/mongo_20230523/incremental_3
Inc n position: (Inc(n) = Between Inc(n-1) and Full backup(m) )
{"ts": {"$gt": {"$timestamp": {"t": 1666619908,"i": 1}}, "$lte": {"$timestamp": {"t": 1666619998,"i": 1}}}}
© Pythian Services Inc 2023 | Confidential | 35
TIME
Full backup(n)
Inc 1 Inc 2 Inc 3 Inc n
Full backup(m)
PITR
Full backup : 1pm
Incremental backups: every 1 hour
4:30pm - Delete operation on users.meta namespace
© Pythian Services Inc 2023 | Confidential | 36
TIME
Disaster
RTO
Full backup(n)
DOWNTIME
Inc 1 Inc 2 Inc 3 Inc n
RPO
PITR
Identify the erroneous operation start time
bsondump --quiet /backup/mongo_20230523/oplog_4/local/oplog.rs.bson | grep '"op":"d","ns":"users.meta"' {"op": "d","ns": "users.meta","ui":
{"$binary": {"base64": "ZlkpNQpySoG98UFLQvYZnw==","subType": "04"}},"o": {"_id": {"$oid": "636a7cd663089cc37ae7c96c"}},"ts": {"$timestamp":
{"t": 1684859539,"i": 1}},"t": {"$numberLong": "6"},"v": {"$numberLong": "2"},"wall":{"$date": {"$numberLong": "1667917939452"}}}
Erroneous operation : "ts": {"$timestamp": {"t": 1684859539,"i": 1}}
© Pythian Services Inc 2023 | Confidential | 37
TIME
RTO
Full backup(n)
DOWNTIME
Inc 1 Inc 2 Inc 3 Inc n
RPO
Disaster
PITR
Restore the Full backup(n)
Restore the incremental backups using mongorestore --oplogReplay
cp /backup/mongo_20230523/oplog_1/local/oplog.rs.bson /backup/oplogR1/oplog.bson
mongorestore --port 57017 –u < username > -p < password > --authenticationDatabase=admin --oplogReplay /backup/oplogR1
© Pythian Services Inc 2023 | Confidential | 38
TIME
RTO
Full backup(n)
DOWNTIME
Inc 1 Inc 2 Inc 3 Inc n
RPO
Disaster
PITR
Erroneous operation : "ts": {"$timestamp": {"t": 1684859539,"i": 1}}
Restore the final incremental backup using mongorestore --oplogReplay --oplogLimit
cp /backup/mongo_20230523/oplog_4/local/oplog.rs.bson /backup/oplog4/oplog.bson
mongorestore --port 57017 -u < username > -p < password > --authenticationDatabase=admin --oplogReplay --oplogLimit 1684859539, 1 /backup/oplog4
© Pythian Services Inc 2023 | Confidential | 39
TIME
RTO >= 0
Full backup(n)
DOWNTIME
Inc 1 Inc 2 Inc 3 Inc n
RPO=0
Disaster
Summary
• Run backups as part of your organization’s DR strategy
• Logical backups work well with smaller DB size, for larger DBs use physical
• Backups are only good as long as they can be restored
• For Replica sets run backups on a MongoDB Secondary node (hidden or
delayed member)
• For Sharded clusters you need to backup each shard and the config servers
metadata while the balancer is stopped
• Cloud manager/Ops manager backup are enterprise licenced
• Full physical backup and incremental oplog backups will allow you PITR
• RPO ~ 0 means you need to take backups more frequently
• RTO ~ 0 means you need to invest in automating the restore
© Pythian Services Inc 2023 | Confidential | 40
ChatGPT - Explain best practices for MongoDB backups and PITR
MongoDB backups and point-in-time recovery (PITR) are critical aspects of ensuring data availability and recovery in the event of data loss or system failure.
Here are some best practices to consider when performing backups and PITR in MongoDB:
1. Choose the right backup strategy: MongoDB offers several backup strategies, including file system backups, logical backups, and
continuous backups. Choose the right backup strategy based on your business requirements, data size, and recovery objectives.
2. Set backup schedules and retention periods: Create a backup schedule that fits your business needs and set a retention period that
aligns with your recovery objectives. Ensure that you have enough backup storage to retain backups for the desired duration.
3. Use replica sets: MongoDB replica sets provide high availability and data redundancy. By configuring a replica set, you can create
multiple copies of your data across different nodes. This ensures that you always have a copy of your data available for recovery.
4. Enable journaling: Journaling is a feature that ensures data consistency and durability. By enabling journaling, MongoDB can recover
data from incomplete write operations in the event of a system failure.
5. Monitor backup performance: Monitor backup performance to ensure that backups are completed within the scheduled window. Use
tools such as MongoDB Management Service (MMS) to monitor backup status and performance.
6. Test backups regularly: Regularly test your backups to ensure that you can restore your data when needed. Perform a full restore
from a backup to a separate environment to test backup integrity and recovery procedures.
7. Implement PITR: Point-in-time recovery (PITR) allows you to restore your database to a specific point in time. This can be useful
when you need to recover from a data corruption or user error. Ensure that you have enabled oplog (operation log) to enable PITR.
8. Use automation: Use automation tools to simplify backup and PITR operations. Tools such as MongoDB Ops Manager and MongoDB
Atlas provide automated backup and recovery processes.
By following these best practices, you can ensure that your MongoDB backups and PITR processes are reliable and effective in maintaining data
availability and recovery.
© Pythian Services Inc 2023 | Confidential | 41
Thank you!
© Pythian Services Inc 2023 | Confidential| 41
References
How to backup MongoDB database using lvm snapshots - Part 1
MongoDB incremental backups using the oplog - Part 2
MongoDB Backups and Point In Time Recovery - Part 3
Percona Backup for MongoDB Documentation
FAQ: Backup and Restore — MongoDB Cloud Manager
FAQ: Backup and Restore — MongoDB Ops Manager
MongoDB Backup and Restore - Best Practices and Techniques
© Pythian Services Inc 2023 | Confidential | 43

More Related Content

What's hot

Deploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia NetworksDeploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia Networks
MariaDB plc
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
Digicomp Academy Suisse Romande SA
 
Oracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API ExamplesOracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API Examples
Bobby Curtis
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
Vimlendu Kumar
 
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
yoshimotot
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
Zalando Technology
 
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDBHow Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
ScyllaDB
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
Pini Dibask
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGateExtreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGate
Bobby Curtis
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
Mydbops
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)
PingCAP
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
Norberto Leite
 
Oracle GoldenGate Performance Tuning
Oracle GoldenGate Performance TuningOracle GoldenGate Performance Tuning
Oracle GoldenGate Performance Tuning
Bobby Curtis
 
MongoDB Administration 101
MongoDB Administration 101MongoDB Administration 101
MongoDB Administration 101
MongoDB
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenPostgresOpen
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )
Mydbops
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Karan Singh
 

What's hot (20)

Deploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia NetworksDeploying MariaDB databases with containers at Nokia Networks
Deploying MariaDB databases with containers at Nokia Networks
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
Oracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API ExamplesOracle GoldenGate 18c - REST API Examples
Oracle GoldenGate 18c - REST API Examples
 
Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
私はここでつまづいた! Oracle database 11g から 12cへのアップグレードと Oracle Database 12c の新機能@201...
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDBHow Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
How Discord Migrated Trillions of Messages from Cassandra to ScyllaDB
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
Extreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGateExtreme Replication - Performance Tuning Oracle GoldenGate
Extreme Replication - Performance Tuning Oracle GoldenGate
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Oracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret InternalsOracle RAC 19c: Best Practices and Secret Internals
Oracle RAC 19c: Best Practices and Secret Internals
 
A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)A Brief Introduction of TiDB (Percona Live)
A Brief Introduction of TiDB (Percona Live)
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
Oracle GoldenGate Performance Tuning
Oracle GoldenGate Performance TuningOracle GoldenGate Performance Tuning
Oracle GoldenGate Performance Tuning
 
MongoDB Administration 101
MongoDB Administration 101MongoDB Administration 101
MongoDB Administration 101
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )Percona XtraDB Cluster ( Ensure high Availability )
Percona XtraDB Cluster ( Ensure high Availability )
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
 

Similar to MongoDB Backups and PITR

Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDBPercona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
Jean Da Silva
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheus
Bob Cotton
 
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
NETWAYS
 
Protecting data with CSI Volume Snapshots on Kubernetes
Protecting data with CSI Volume Snapshots on KubernetesProtecting data with CSI Volume Snapshots on Kubernetes
Protecting data with CSI Volume Snapshots on Kubernetes
DoKC
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
Jimmy Angelakos
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
Tapio Rautonen
 
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
NTT DATA Technology & Innovation
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Severalnines
 
Backups
BackupsBackups
Backups
Payal Singh
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
Carlos Andrés García
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
VMware Tanzu
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
EDB
 
OSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
OSMC 2018 | Why we recommend PMM to our clients by Matthias CrauwelsOSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
OSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
NETWAYS
 
Video Analysis in Hadoop
Video Analysis in HadoopVideo Analysis in Hadoop
Video Analysis in Hadoop
DataWorks Summit
 
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
Andrejs Prokopjevs
 
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander KukushkinPGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
Equnix Business Solutions
 
DevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheusDevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga
 
Building an analytics workflow using Apache Airflow
Building an analytics workflow using Apache AirflowBuilding an analytics workflow using Apache Airflow
Building an analytics workflow using Apache Airflow
Yohei Onishi
 
Aerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptxAerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptx
Aerospike Inc
 
Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
EDB
 

Similar to MongoDB Backups and PITR (20)

Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDBPercona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
Percona Live 2022 - PBM - The Backup Open Source Tool for MongoDB
 
Time series denver an introduction to prometheus
Time series denver   an introduction to prometheusTime series denver   an introduction to prometheus
Time series denver an introduction to prometheus
 
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
OSMC 2021 | pg_stat_monitor: A cool extension for better database (PostgreSQL...
 
Protecting data with CSI Volume Snapshots on Kubernetes
Protecting data with CSI Volume Snapshots on KubernetesProtecting data with CSI Volume Snapshots on Kubernetes
Protecting data with CSI Volume Snapshots on Kubernetes
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on Kubernetes
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
 
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
 
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
Webinar slides: Backup Management for MySQL, MariaDB, PostgreSQL & MongoDB wi...
 
Backups
BackupsBackups
Backups
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
 
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKSPostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
PostgreSQL-as-a-Service with Crunchy PostgreSQL for PKS
 
An overview of reference architectures for Postgres
An overview of reference architectures for PostgresAn overview of reference architectures for Postgres
An overview of reference architectures for Postgres
 
OSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
OSMC 2018 | Why we recommend PMM to our clients by Matthias CrauwelsOSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
OSMC 2018 | Why we recommend PMM to our clients by Matthias Crauwels
 
Video Analysis in Hadoop
Video Analysis in HadoopVideo Analysis in Hadoop
Video Analysis in Hadoop
 
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
Oracle EBS Journey to the Cloud - What is New in 2022 (UKOUG Breakthrough 22 ...
 
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander KukushkinPGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
PGConf.ASIA 2019 Bali - Patroni in 2019 - Alexander Kukushkin
 
DevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheusDevOps Braga #15: Agentless monitoring with icinga and prometheus
DevOps Braga #15: Agentless monitoring with icinga and prometheus
 
Building an analytics workflow using Apache Airflow
Building an analytics workflow using Apache AirflowBuilding an analytics workflow using Apache Airflow
Building an analytics workflow using Apache Airflow
 
Aerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptxAerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptx
 
Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical Replication
 

More from Igor Donchovski

Sharding and things we'd like to see improved
Sharding and things we'd like to see improvedSharding and things we'd like to see improved
Sharding and things we'd like to see improved
Igor Donchovski
 
Maintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica SetsMaintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica Sets
Igor Donchovski
 
Exploring the replication and sharding in MongoDB
Exploring the replication and sharding in MongoDBExploring the replication and sharding in MongoDB
Exploring the replication and sharding in MongoDB
Igor Donchovski
 
How to scale MongoDB
How to scale MongoDBHow to scale MongoDB
How to scale MongoDB
Igor Donchovski
 
MongoDB HA - what can go wrong
MongoDB HA - what can go wrongMongoDB HA - what can go wrong
MongoDB HA - what can go wrong
Igor Donchovski
 
Enhancing the default MongoDB Security
Enhancing the default MongoDB SecurityEnhancing the default MongoDB Security
Enhancing the default MongoDB Security
Igor Donchovski
 
Exploring the replication in MongoDB
Exploring the replication in MongoDBExploring the replication in MongoDB
Exploring the replication in MongoDB
Igor Donchovski
 
Working with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBAWorking with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBA
Igor Donchovski
 

More from Igor Donchovski (8)

Sharding and things we'd like to see improved
Sharding and things we'd like to see improvedSharding and things we'd like to see improved
Sharding and things we'd like to see improved
 
Maintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica SetsMaintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica Sets
 
Exploring the replication and sharding in MongoDB
Exploring the replication and sharding in MongoDBExploring the replication and sharding in MongoDB
Exploring the replication and sharding in MongoDB
 
How to scale MongoDB
How to scale MongoDBHow to scale MongoDB
How to scale MongoDB
 
MongoDB HA - what can go wrong
MongoDB HA - what can go wrongMongoDB HA - what can go wrong
MongoDB HA - what can go wrong
 
Enhancing the default MongoDB Security
Enhancing the default MongoDB SecurityEnhancing the default MongoDB Security
Enhancing the default MongoDB Security
 
Exploring the replication in MongoDB
Exploring the replication in MongoDBExploring the replication in MongoDB
Exploring the replication in MongoDB
 
Working with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBAWorking with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBA
 

Recently uploaded

State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 

Recently uploaded (20)

State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 

MongoDB Backups and PITR

  • 1. MongoDB Backups and PITR Igor Donchovski May-23-2023 © Pythian Services Inc 2023 | Confidential|
  • 2. About me --- Name: Igor Donchovski Company: Pythian Email: donchovski@pythian.com Current_Role: Principle Consultant Education: - Type: Master Name: FINKI Graduated: 2013 University: UKIM Certificates: - MongoDB: C100DBA - Oracle: - MySQL 5.7 Professional - OCI Foundations Associate - HashiCorp: Terraform Associate (002) - Google: PCA Social: - Network: LinkedIn url: https://mk.linkedin.com/in/igorle - Network: Twitter url: https://twitter.com/igorle © Pythian Services Inc 2023 | Confidential | 2
  • 3. 25 Years in Business 450+ Experts across every Data Domain & Technology 400+ Global Customers _______________ Gold Partner 40+ Certifications 5 Competencies, Incl. Data Analytics and Data Platform _______________ Silver Partner 50+ Certifications Migration Factory Certified Apps Hosting _______________ Advanced Partner 1O0+ Certs/Accreds Migration & DevOps Competencies Pythian overview ________________ Premier Partner 120+ Certs/Creds 6 Specializations, MSP Badge, Partner & Technical Advisory Bds Pythian maximizes the value of your data estate by delivering advanced on-prem, hybrid, cloud, and multi-cloud solutions and solving your toughest data and analytics challenges. _______________ Select Partner 10+ Certs/Accreds _______________ Platinum Partner 60+ Certifications Advisory Board Member © Pythian Services Inc 2023 | Confidential | 3
  • 4. Overview • Why Backups • RTO and RPO • Types of backups • MongoDB specifics • PITR • ChatGPT feedback • QA © Pythian Services Inc 2023 | Confidential | 4
  • 5. Why Backups © Pythian Services Inc 2023 | Confidential | 5
  • 6. Why Backups © Pythian Services Inc 2023 | Confidential | 6 High Availability Disast r Re ov ry Scalability Elasticity Auto ation Performance
  • 7. ● Power outage ● Software issues ● Hardware failure ● User error ● Network outages ● Natural disaster ● Other Why Backups © Pythian Services Inc 2023 | Confidential | 7 High Availability Scalability Elasticity Disast r Re ov ry Performance
  • 8. ● RTO - recovery time objective ○ How long it will take to recover? ● RPO - recovery point objective ○ How much data can we lose? Why Backups © Pythian Services Inc 2023 | Confidential | 8 TIME Disaster RTO RPO LOST DATA DOWNTIME
  • 9. Types of Backups © Pythian Services Inc 2023 | Confidential | 9
  • 10. Types of Backups Logical • Easy to implement • Human readable • Slow for larger dataset • Might affect database performance • mongodump (Binary export. Does not contain the index data) • mongoexport (json or csv export for collection) • Works with Replica sets and Sharded clusters © Pythian Services Inc 2023 | Confidential | 10
  • 11. Types of Backups Physical • Moderate to implement • Cold or hot • Filesystem copy (cp, rsync) • LVM Snapshot • Cloud based disk snapshot • Percona backup for MongoDB • MongoDB Cloud manager or Ops manager © Pythian Services Inc 2023 | Confidential | 11
  • 12. ● Sharded clusters ● Replica sets Types of Backups - MongoDB © Pythian Services Inc 2023 | Confidential | 12
  • 13. ● Replica sets Types of Backups - MongoDB © Pythian Services Inc 2023 | Confidential | 13 ● Sharded clusters
  • 14. Logical Backups © Pythian Services Inc 2023 | Confidential | 14
  • 15. Logical Backup • mongodump mongodump --host mongodb1.example.net --port 27017 --username user --password pass --oplog --out /backup/mongodump-2023-05-23 Optional --db Specifies the database to backup. Does not work with --oplog --collection Specifies the collection to backup --query Limits the documents returned in the output --gzip Compresses the output --numParallelCollections=N (No of collections to export in parallel. Default to 4) • mongorestore mongorestore --host mongodb1.example.net --port 27017 --username user --password pass --OplogReplay --oplogLimit <timestamp> /backup/mongodump-2023-05-23 © Pythian Services Inc 2023 | Confidential | 15
  • 16. Logical Backup • mongoexport mongoexport --host mongodb1.example.net --port 27017 --username user --password pass --db marketing --collection contacts --out /backups/contacts.json Optional --csv Changes the export format to CSV --fields Specifies a field or fields to include in the export --query Limits the documents returned in the output • mongoimport mongoimport --host mongodb1.example.net --port 27017 --username user --password pass --db marketing --collection contacts --file /backups/contacts.json © Pythian Services Inc 2023 | Confidential | 16
  • 17. Physical Backups © Pythian Services Inc 2023 | Confidential | 17
  • 18. Physical Backups ● Run on a Secondary node for replica set (Hidden, Delayed) ● Lock the database for writes > db.fsyncLock() ● Take backup from the disk[s] relevant for mongo ● Grab the latest oplog position (optional) ● Unlock the database for writes > db.fsyncUnlock() ● Copy the backup to offsite location © Pythian Services Inc 2023 | Confidential | 18
  • 19. Physical Backups Filesystem copy (cp, rsync) ● Stop mongod process ● Rsync or cp the files to external location $ rsync -av --partial --inplace --append --progress user@mongodb1.example.net:/backups/mongodb ● Start mongod process ● Might take a while for large datasets © Pythian Services Inc 2023 | Confidential | 19
  • 20. Physical Backups LVM snapshot ● Hot backup on running mongod > db.fsyncLock() lvcreate -L5G -s -n mongosnap_23may2023 /dev/vgdiskdata/lvmongo ➔ /dev/vgdiskdata/lvmongo - Logical volume path ➔ lvmongo - LV Name ➔ -L Size of the snapshot ➔ -s It’s a snapshot ➔ -n Name for the snapshot © Pythian Services Inc 2023 | Confidential | 20
  • 21. Physical Backups LVM snapshot mkdir /tmp/mongosnap mount -t xfs -o nouuid,ro /dev/vgdiskdata/mongosnap_23may2023 /tmp/mongosnap/ > db.fsyncUnlock() tar -czf /backups/mongodb_backup_$(date '+%Y%m%d%H%M').tar.gz --absolute-names /tmp/mongosnap umount /tmp/mongosnap lvremove /dev/vgdiskdata/mongosnap_23may2023 © Pythian Services Inc 2023 | Confidential | 21
  • 22. Physical Backups Cloud based disk snapshot AWS aws ec2 create-snapshot --volume-id VOLUME-ID --description "This is my mongo volume snapshot" GCP gcloud compute snapshots create SNAPSHOT_NAME --source-disk SOURCE_DISK --source-disk-zone SOURCE_DISK_ZONE Azure az snapshot create -g ResourceGroup --source MONGO-DISK-ID --name mongoDisk-bak © Pythian Services Inc 2023 | Confidential | 22
  • 23. Physical Backups Percona backup for MongoDB ● Logical and physical backups and restores ● Selective logical backups and restores with PITR ● Works for both sharded clusters and non-sharded replica sets ● Can be used with any S3-compatible storage ● Support for Microsoft Azure Blob storage ● Supports filesystem storage type for locally mounted remote filesystem backup servers © Pythian Services Inc 2023 | Confidential | 23
  • 24. Physical Backups PBM Architecture ● pbm-agent is a process running on every mongod node within the cluster or a replica set that performs backup and restore operations ● pbm CLI is a command-line utility that instructs pbm-agents to perform an operation ● PBM Control collections are special collections in MongoDB that store the configuration data and backup states ● Remote backup storage as either s3-compatible or filesystem type storage pbm backup --type=logical|physical --compression=gzip © Pythian Services Inc 2023 | Confidential | 24
  • 25. Physical Backups MongoDB Cloud manager backup © Pythian Services Inc 2023 | Confidential | 25
  • 26. Physical Backups MongoDB Cloud manager backup ● Requires monthly subscription based on snapshot size, schedule, and retention policy ● Install the backup agent and configure in cloud.mongodb.com ● Optional namespace filter to exclude collections from the backup ● Point in time recovery with low overhead ● Data transfer to Cloud manager datacenters is encrypted ● Stores at least 3 copies of your data in at least 2 geographic locations to ensure redundancy ● Only works with deployments of up to 100k collections ● Snapshot lowest frequency of 6 hours © Pythian Services Inc 2023 | Confidential | 26
  • 27. Physical Backups MongoDB Ops manager backup ● Must run with MongoDB enterprise ● Works with deployments of up to 100k collections ● Replica set, sharded cluster, and shard names within the same project must be unique © Pythian Services Inc 2023 | Confidential | 27
  • 28. PITR © Pythian Services Inc 2023 | Confidential | 28
  • 29. PITR © Pythian Services Inc 2023 | Confidential | 29 TIME RTO LOST DATA DOWNTIME Full backup RPO Disaster
  • 30. PITR Incremental backups © Pythian Services Inc 2023 | Confidential | 30 TIME RTO Full backup LOST DATA DOWNTIME Inc backup Disaster
  • 31. PITR Incremental backups ● RPO ~ 0 © Pythian Services Inc 2023 | Confidential | 31 TIME RTO Full backup LOST DATA DOWNTIME Inc 1 Inc 2 Inc 3 Inc n Disaster
  • 32. PITR Full backup: lvm snapshot + Incremental backups using the Oplog root @mongodb: ~# mongo - u < username > -p < password > --port < port > --quiet backup_oplog_ts.js > oplog_position cat backup_oplog_ts.js var local = db.getSiblingDB('local'); var last = local['oplog.rs'].find().sort({ '$natural': -1 }).limit(1)[0]; var result = {}; if (last != null) { result = { position: last['ts'] }; } print(JSON.stringify(result)); © Pythian Services Inc 2023 | Confidential | 32 TIME Full backup "$timestamp": {"t": 1666355398,"i": 1}
  • 33. PITR Oplog backup using mongodump Inc 1 start position {"position": {"$timestamp": {"t": 1666355398,"i": 1}}} mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase = admin - d local - c oplog.rs --query='{"ts": { "$gt": {"$timestamp":{"t":1666355398,"i":1}}}}' -o/backups/mongo_20230523/incremental_1 Inc 2 start position (end of Inc 1) bsondump --quiet /backup/mongo_20230523/incremental_1/local/oplog.rs.bson | tail -1 | jq -c .ts {"$timestamp": {"t": 1666616998, "i": 1 }} © Pythian Services Inc 2023 | Confidential | 33 TIME Full backup Inc 1
  • 34. PITR Inc 2 {"position": {"$timestamp": {"t": 1666616998,"i": 1}}} mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase=admin -d local -c oplog.rs --query='{"ts": { "$gt": {"$timestamp":{"t":1666616998,"i":1}}}}' -o /backups/mongo_20230523/incremental_2 Inc 3 start position (end of Inc 2) bsondump --quiet/backup/mongo_20230523/incremental_2/local/oplog.rs.bson | tail -1 | jq -c .ts {"$timestamp": {"t": 1666617939,"i": 1}} © Pythian Services Inc 2023 | Confidential | 34 TIME Full backup Inc 1 Inc 2 Inc 3 Inc n
  • 35. PITR Inc 3 {"position": {"$timestamp": {"t": 1666617939,"i": 1}}} mongodump --quiet -u < username > -p < password > --port < port > --authenticationDatabase=admin -d local -c oplog.rs --query='{"ts": { "$gt": {"$timestamp":{"t":1666617939,"i":1}}}}' -o /backups/mongo_20230523/incremental_3 Inc n position: (Inc(n) = Between Inc(n-1) and Full backup(m) ) {"ts": {"$gt": {"$timestamp": {"t": 1666619908,"i": 1}}, "$lte": {"$timestamp": {"t": 1666619998,"i": 1}}}} © Pythian Services Inc 2023 | Confidential | 35 TIME Full backup(n) Inc 1 Inc 2 Inc 3 Inc n Full backup(m)
  • 36. PITR Full backup : 1pm Incremental backups: every 1 hour 4:30pm - Delete operation on users.meta namespace © Pythian Services Inc 2023 | Confidential | 36 TIME Disaster RTO Full backup(n) DOWNTIME Inc 1 Inc 2 Inc 3 Inc n RPO
  • 37. PITR Identify the erroneous operation start time bsondump --quiet /backup/mongo_20230523/oplog_4/local/oplog.rs.bson | grep '"op":"d","ns":"users.meta"' {"op": "d","ns": "users.meta","ui": {"$binary": {"base64": "ZlkpNQpySoG98UFLQvYZnw==","subType": "04"}},"o": {"_id": {"$oid": "636a7cd663089cc37ae7c96c"}},"ts": {"$timestamp": {"t": 1684859539,"i": 1}},"t": {"$numberLong": "6"},"v": {"$numberLong": "2"},"wall":{"$date": {"$numberLong": "1667917939452"}}} Erroneous operation : "ts": {"$timestamp": {"t": 1684859539,"i": 1}} © Pythian Services Inc 2023 | Confidential | 37 TIME RTO Full backup(n) DOWNTIME Inc 1 Inc 2 Inc 3 Inc n RPO Disaster
  • 38. PITR Restore the Full backup(n) Restore the incremental backups using mongorestore --oplogReplay cp /backup/mongo_20230523/oplog_1/local/oplog.rs.bson /backup/oplogR1/oplog.bson mongorestore --port 57017 –u < username > -p < password > --authenticationDatabase=admin --oplogReplay /backup/oplogR1 © Pythian Services Inc 2023 | Confidential | 38 TIME RTO Full backup(n) DOWNTIME Inc 1 Inc 2 Inc 3 Inc n RPO Disaster
  • 39. PITR Erroneous operation : "ts": {"$timestamp": {"t": 1684859539,"i": 1}} Restore the final incremental backup using mongorestore --oplogReplay --oplogLimit cp /backup/mongo_20230523/oplog_4/local/oplog.rs.bson /backup/oplog4/oplog.bson mongorestore --port 57017 -u < username > -p < password > --authenticationDatabase=admin --oplogReplay --oplogLimit 1684859539, 1 /backup/oplog4 © Pythian Services Inc 2023 | Confidential | 39 TIME RTO >= 0 Full backup(n) DOWNTIME Inc 1 Inc 2 Inc 3 Inc n RPO=0 Disaster
  • 40. Summary • Run backups as part of your organization’s DR strategy • Logical backups work well with smaller DB size, for larger DBs use physical • Backups are only good as long as they can be restored • For Replica sets run backups on a MongoDB Secondary node (hidden or delayed member) • For Sharded clusters you need to backup each shard and the config servers metadata while the balancer is stopped • Cloud manager/Ops manager backup are enterprise licenced • Full physical backup and incremental oplog backups will allow you PITR • RPO ~ 0 means you need to take backups more frequently • RTO ~ 0 means you need to invest in automating the restore © Pythian Services Inc 2023 | Confidential | 40
  • 41. ChatGPT - Explain best practices for MongoDB backups and PITR MongoDB backups and point-in-time recovery (PITR) are critical aspects of ensuring data availability and recovery in the event of data loss or system failure. Here are some best practices to consider when performing backups and PITR in MongoDB: 1. Choose the right backup strategy: MongoDB offers several backup strategies, including file system backups, logical backups, and continuous backups. Choose the right backup strategy based on your business requirements, data size, and recovery objectives. 2. Set backup schedules and retention periods: Create a backup schedule that fits your business needs and set a retention period that aligns with your recovery objectives. Ensure that you have enough backup storage to retain backups for the desired duration. 3. Use replica sets: MongoDB replica sets provide high availability and data redundancy. By configuring a replica set, you can create multiple copies of your data across different nodes. This ensures that you always have a copy of your data available for recovery. 4. Enable journaling: Journaling is a feature that ensures data consistency and durability. By enabling journaling, MongoDB can recover data from incomplete write operations in the event of a system failure. 5. Monitor backup performance: Monitor backup performance to ensure that backups are completed within the scheduled window. Use tools such as MongoDB Management Service (MMS) to monitor backup status and performance. 6. Test backups regularly: Regularly test your backups to ensure that you can restore your data when needed. Perform a full restore from a backup to a separate environment to test backup integrity and recovery procedures. 7. Implement PITR: Point-in-time recovery (PITR) allows you to restore your database to a specific point in time. This can be useful when you need to recover from a data corruption or user error. Ensure that you have enabled oplog (operation log) to enable PITR. 8. Use automation: Use automation tools to simplify backup and PITR operations. Tools such as MongoDB Ops Manager and MongoDB Atlas provide automated backup and recovery processes. By following these best practices, you can ensure that your MongoDB backups and PITR processes are reliable and effective in maintaining data availability and recovery. © Pythian Services Inc 2023 | Confidential | 41
  • 42. Thank you! © Pythian Services Inc 2023 | Confidential| 41
  • 43. References How to backup MongoDB database using lvm snapshots - Part 1 MongoDB incremental backups using the oplog - Part 2 MongoDB Backups and Point In Time Recovery - Part 3 Percona Backup for MongoDB Documentation FAQ: Backup and Restore — MongoDB Cloud Manager FAQ: Backup and Restore — MongoDB Ops Manager MongoDB Backup and Restore - Best Practices and Techniques © Pythian Services Inc 2023 | Confidential | 43