Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
570 changes: 238 additions & 332 deletions addons/mongodb/dataprotection/common-scripts.sh

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions addons/mongodb/dataprotection/pbm-full-backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
set -o pipefail
# syncerctl is delivered through the target data PVC at ${MOUNT_DIR}/tmp/bin.
export PATH="$PATH:${MOUNT_DIR}/tmp/bin"

trap handle_pbm_backup_exit EXIT
run_pbm_full_backup
10 changes: 10 additions & 0 deletions addons/mongodb/dataprotection/pbm-full-restore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
set -o pipefail
# syncerctl is delivered through the target data PVC at $MOUNT_DIR/tmp/bin.
export PATH="$PATH:$MOUNT_DIR/tmp/bin"

set_backup_config_env

trap handle_restore_exit EXIT
run_pbm_full_restore
13 changes: 13 additions & 0 deletions addons/mongodb/dataprotection/pbm-pitr-backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# For PITR with PBM physical backups, create a fresh base backup whenever new collections must be included by restore.
# PBM only writes data to existing collections and does not support creating new ones during PITR, so a new
# (sharded) collection needs a new backup to be included. Shared by replica-set and sharded deployments.
# Ref: https://docs.percona.com/percona-backup-mongodb/usage/pitr-physical.html#post-restore-steps
set -e
set -o pipefail
# syncerctl is delivered through the target data PVC at ${MOUNT_DIR}/tmp/bin.
export PATH="$PATH:${MOUNT_DIR}/tmp/bin"

trap handle_pbm_backup_exit EXIT
run_pbm_pitr_backup
10 changes: 10 additions & 0 deletions addons/mongodb/dataprotection/pbm-pitr-restore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
set -o pipefail
# syncerctl is delivered through the target data PVC at $MOUNT_DIR/tmp/bin.
export PATH="$PATH:$MOUNT_DIR/tmp/bin"

set_backup_config_env

trap handle_restore_exit EXIT
run_pbm_pitr_restore
43 changes: 0 additions & 43 deletions addons/mongodb/dataprotection/rs-pbm-full-backup.sh

This file was deleted.

44 changes: 0 additions & 44 deletions addons/mongodb/dataprotection/rs-pbm-full-restore.sh

This file was deleted.

136 changes: 0 additions & 136 deletions addons/mongodb/dataprotection/rs-pbm-pitr-backup.sh

This file was deleted.

41 changes: 0 additions & 41 deletions addons/mongodb/dataprotection/rs-pbm-pitr-restore.sh

This file was deleted.

7 changes: 0 additions & 7 deletions addons/mongodb/dataprotection/rs-pbm-restore-prepare.sh

This file was deleted.

43 changes: 0 additions & 43 deletions addons/mongodb/dataprotection/shard-pbm-full-backup.sh

This file was deleted.

Loading
Loading