mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding restore mongo fabric command.
This commit is contained in:
parent
36b3fa92c1
commit
a408d16a4b
1 changed files with 5 additions and 0 deletions
5
fabfile.py
vendored
5
fabfile.py
vendored
|
@ -695,6 +695,11 @@ def restore_postgres():
|
|||
sudo('su postgres -c "createdb newsblur -O newsblur"')
|
||||
sudo('su postgres -c "pg_restore --role=newsblur --dbname=newsblur backup_postgresql_%s.sql.gz"' % backup_date)
|
||||
|
||||
def restore_mongo():
|
||||
backup_date = '2012-07-24-09-00'
|
||||
run('PYTHONPATH=/home/sclay/newsblur python s3.py get backup_mongo_%s.tgz' % backup_date)
|
||||
run('tar -xf backup_mongo_%s.tgz' % backup_date)
|
||||
run('mongorestore backup_mongo_%s' % backup_date)
|
||||
|
||||
# ======
|
||||
# = S3 =
|
||||
|
|
Loading…
Add table
Reference in a new issue