mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Remove sub-directories in /mongo-export
On Digital Ocean a persistent volume has a folder `lost+found` by default. This script stops throws error messages because it can't remove that folder if we don't add `-r` flag.
This commit is contained in:
parent
2c0110b63f
commit
064e98943d
@ -18,7 +18,7 @@ echo "UPLOADS_DIRECTORY ${UPLOADS_DIRECTORY}"
|
||||
echo "-------------------------------------------------"
|
||||
|
||||
mongo ${MONGODB_DATABASE} --eval "db.dropDatabase();"
|
||||
rm -f /mongo-export/*
|
||||
rm -rf /mongo-export/*
|
||||
|
||||
ssh -4 -M -S my-ctrl-socket -fnNT -L 27018:localhost:27017 -l ${SSH_USERNAME} ${SSH_HOST}
|
||||
mongodump --host localhost -d ${MONGODB_DATABASE} --port 27018 --username ${MONGODB_USERNAME} --password ${MONGODB_PASSWORD} --authenticationDatabase ${MONGODB_AUTH_DB} --gzip --archive | mongorestore --gzip --archive
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user