SlideShare a Scribd company logo
1 of 43
Download to read offline
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

Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceMariaDB plc
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialJean-François Gagné
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveSveta Smirnova
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB plc
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOpsSveta Smirnova
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practiceEugene Fidelin
 
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
re:Invent 2022  DAT326 Deep dive into Amazon Aurora and its innovationsre:Invent 2022  DAT326 Deep dive into Amazon Aurora and its innovations
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovationsGrant McAlister
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuningelliando dias
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)Mydbops
 
M|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB ServerM|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB ServerMariaDB plc
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Creating a complete disaster recovery strategy
Creating a complete disaster recovery strategyCreating a complete disaster recovery strategy
Creating a complete disaster recovery strategyMariaDB plc
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoKeith Hollman
 
MariaDB 10: The Complete Tutorial
MariaDB 10: The Complete TutorialMariaDB 10: The Complete Tutorial
MariaDB 10: The Complete TutorialColin Charles
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 MinutesSveta Smirnova
 

What's hot (20)

Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication TutorialThe Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
 
MySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to HaveMySQL Database Monitoring: Must, Good and Nice to Have
MySQL Database Monitoring: Must, Good and Nice to Have
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
PostgreSQL replication
PostgreSQL replicationPostgreSQL replication
PostgreSQL replication
 
MariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and OptimizationMariaDB Performance Tuning and Optimization
MariaDB Performance Tuning and Optimization
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
MySQL Shell for DBAs
MySQL Shell for DBAsMySQL Shell for DBAs
MySQL Shell for DBAs
 
MySQL Performance for DevOps
MySQL Performance for DevOpsMySQL Performance for DevOps
MySQL Performance for DevOps
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
re:Invent 2022  DAT326 Deep dive into Amazon Aurora and its innovationsre:Invent 2022  DAT326 Deep dive into Amazon Aurora and its innovations
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)
 
M|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB ServerM|18 How to use MyRocks with MariaDB Server
M|18 How to use MyRocks with MariaDB Server
 
MongoDB Backup & Disaster Recovery
MongoDB Backup & Disaster RecoveryMongoDB Backup & Disaster Recovery
MongoDB Backup & Disaster Recovery
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Creating a complete disaster recovery strategy
Creating a complete disaster recovery strategyCreating a complete disaster recovery strategy
Creating a complete disaster recovery strategy
 
MySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & DemoMySQL InnoDB Cluster HA Overview & Demo
MySQL InnoDB Cluster HA Overview & Demo
 
MariaDB 10: The Complete Tutorial
MariaDB 10: The Complete TutorialMariaDB 10: The Complete Tutorial
MariaDB 10: The Complete Tutorial
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 

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 MongoDBJean 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 prometheusBob 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 KubernetesDoKC
 
Deploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesDeploying PostgreSQL on Kubernetes
Deploying PostgreSQL on KubernetesJimmy Angelakos
 
Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and HerokuTapio 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
 
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 PKSVMware Tanzu
 
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 PKSCarlos Andrés García
 
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 PostgresEDB
 
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 CrauwelsNETWAYS
 
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 KukushkinEqunix 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 prometheusDevOps 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 AirflowYohei Onishi
 
Aerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptxAerospike O&M Webinar.pptx
Aerospike O&M Webinar.pptxAerospike Inc
 
Online Upgrade Using Logical Replication
 Online Upgrade Using Logical Replication Online Upgrade Using Logical Replication
Online Upgrade Using Logical ReplicationEDB
 

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 improvedIgor Donchovski
 
Maintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica SetsMaintenance for MongoDB Replica Sets
Maintenance for MongoDB Replica SetsIgor 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 MongoDBIgor Donchovski
 
MongoDB HA - what can go wrong
MongoDB HA - what can go wrongMongoDB HA - what can go wrong
MongoDB HA - what can go wrongIgor Donchovski
 
Enhancing the default MongoDB Security
Enhancing the default MongoDB SecurityEnhancing the default MongoDB Security
Enhancing the default MongoDB SecurityIgor Donchovski
 
Exploring the replication in MongoDB
Exploring the replication in MongoDBExploring the replication in MongoDB
Exploring the replication in MongoDBIgor Donchovski
 
Working with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBAWorking with MongoDB as MySQL DBA
Working with MongoDB as MySQL DBAIgor 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

Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...varanasisatyanvesh
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...mikehavy0
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格q6pzkpark
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证pwgnohujw
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...ThinkInnovation
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshareraiaryan448
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareGraham Ware
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontangsiskavia95
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证acoha1
 
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...ssuserf63bd7
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsBrainSell Technologies
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...BabaJohn3
 
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...rightmanforbloodline
 
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Voces Mineras
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Klinik Aborsi
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...yulianti213969
 
What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationmuqadasqasim10
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.pptRachmaGhifari
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxStephen266013
 

Recently uploaded (20)

Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshare
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontangobat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di  Bontang
obat aborsi Bontang wa 082135199655 jual obat aborsi cytotec asli di Bontang
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
 
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...
Statistics Informed Decisions Using Data 5th edition by Michael Sullivan solu...
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data Analytics
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...Solution manual for managerial accounting 8th edition by john wild ken shaw b...
Solution manual for managerial accounting 8th edition by john wild ken shaw b...
 
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
Las implicancias del memorándum de entendimiento entre Codelco y SQM según la...
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic information
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
 

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