Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 7b5bf34

Browse files
authored
Merge pull request #13 from stone-payments/feature/add-compression-backup
Update script backup
2 parents c6d04c0 + 4f827b8 commit 7b5bf34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/mongodb.pbpm_backup.sh.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if grep -q '"ismaster" : true' /tmp/validate; then
3838
print "INFO" "Logical backups deleted"
3939

4040
print "INFO" "Starting Full Logical Backups"
41-
pbm backup $MONGO_BACKUP_PARAMETERS
41+
pbm backup --compression=snappy $MONGO_BACKUP_PARAMETERS
4242
if [ $? != 0 ]; then
4343
print "ERROR" "Error in backup logical"
4444
else
@@ -74,6 +74,7 @@ if grep -q '"ismaster" : true' /tmp/validate; then
7474
exit 1;
7575
else
7676
print "INFO" "Physical Backup finished successfully"
77+
pigz ${BACKUP_PHYSICAL_PATH}/backup_${BACKUP_CURRENT_DATE}.tar
7778
fi
7879
print "INFO" "Script ended successfully!"
7980

@@ -86,4 +87,4 @@ elif grep -q "Authentication failed" /tmp/validate; then
8687
else
8788
print "WARNING" "This is not the primary node, ending backup script..."
8889
exit 1
89-
fi
90+
fi

0 commit comments

Comments
 (0)