Changes

From SME Server
Jump to navigationJump to search
419 bytes added ,  16:26, 14 November 2021
no edit summary
Line 174: Line 174:  
Then change your repo, and then upgrade mongo.
 
Then change your repo, and then upgrade mongo.
    +
===Backup with system===
 +
 +
With credit to Daniel Berteaud
 +
 +
Action script to dump the mongo DB on pre-backup event
 +
 +
mkdir -p /home/e-smith/db/mongo
 +
 +
cat <<_EOF > /etc/e-smith/events/actions/mongodb-dump
 +
#!/bin/bash -e
 +
/usr/bin/mongodump --quiet --out /home/e-smith/db/mongo/
 +
_EOF
 +
 +
chmod +x /etc/e-smith/events/actions/mongodb-dump
 +
cd /etc/e-smith/events/pre-backup
 +
ln -s ../actions/mongodb-dump ./S60mongodb-dump
    
===Vaporise or reinitialise the database===
 
===Vaporise or reinitialise the database===

Navigation menu