mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
Moving mongo backups
This commit is contained in:
parent
eadcfc4426
commit
58abe3792e
2 changed files with 4 additions and 4 deletions
|
|
@ -65,8 +65,8 @@
|
|||
- name: Create symlink to mounted volume for backups to live
|
||||
file:
|
||||
state: link
|
||||
src: "/mnt/{{ inventory_hostname | regex_replace('db-|-', '') }}/backup/"
|
||||
path: /srv/newsblur/docker/backup
|
||||
src: "/mnt/{{ inventory_hostname | regex_replace('db-|-', '') }}/backup"
|
||||
path: /srv/newsblur/backup/
|
||||
|
||||
- name: Start db-mongo docker container
|
||||
become: yes
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ collections=(
|
|||
user_search
|
||||
)
|
||||
|
||||
if [ $1 == "stories" ]; then
|
||||
if [ $1 = "stories" ]; then
|
||||
collections+=(
|
||||
shared_stories
|
||||
starred_stories
|
||||
|
|
@ -52,7 +52,7 @@ for collection in ${collections[@]}; do
|
|||
now=$(date '+%Y-%m-%d-%H-%M')
|
||||
echo "---> Dumping $collection - ${now}"
|
||||
|
||||
docker exec -it mongo mongodump -d newsblur -c $collection -o /srv/newsblur/backup/backup_mongo
|
||||
docker exec -it mongo mongodump -d newsblur -c $collection -o /backup
|
||||
done;
|
||||
|
||||
echo " ---> Compressing /srv/newsblur/backup/backup_mongo into /srv/newsblur/backup/backup_mongo.tgz"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue