diff options
| author | mo k <mo@mokhan.ca> | 2012-08-14 08:03:38 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-08-14 08:03:38 -0600 |
| commit | 2619298f05776c515c85af4ad65d55fc572ba9c2 (patch) | |
| tree | bc73ad5f590f60dd659dd7108f083905de6eef94 | |
| parent | ebe6a9aa5fd30d02e2b68ad7a02647a9caf254cd (diff) | |
change restore to use 'latest' symlink in restore db task.
| -rw-r--r-- | Rakefile | 4 | ||||
| -rw-r--r-- | capfile | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -42,10 +42,10 @@ end task :restore do # 1. backup prod database - #sh "cap production backup_db" + sh "cap production backup_db" # 2. copy backup to staging sh "ln -s db/backups/`ls -rt db/backups/ | tail -n1` /db/backups/latest" # 3. restore backup on staging - #sh "cap staging restore_db" + sh "cap staging restore_db" end @@ -26,6 +26,6 @@ task :backup_db do end task :restore_db do - upload("db/backups/#{filename}", "db/backups/#{filename}", :via => :scp) + upload("db/backups/latest", "db/backups/latest", :via => :scp) run "psql -U postgress -d #{destination_db} -f #{dumpfile}" end |
