diff options
| author | mo k <mo@mokhan.ca> | 2012-08-15 12:35:55 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-08-15 12:35:55 -0600 |
| commit | c674a9ded15f2d4bc148a6ba23b110a4589da5c2 (patch) | |
| tree | 0245dac05da5d7780cb659c77ab22ea1f791c702 /Rakefile | |
| parent | e8f6bf1c002266642f6cea488ad99d8882c37f38 (diff) | |
create rake restore task to take backup from production and restore it to staging.
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 6 |
1 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` latest" + sh "rm -f latest && ln -s db/backups/`ls -rt db/backups/ | tail -n1` latest" # 3. restore backup on staging - #sh "cap staging restore_db" + sh "cap staging restore_db" end |
