345 the production site. I can check then check the migration is also going fine, by |
345 the production site. I can check then check the migration is also going fine, by |
346 first restoring a dump from the production site, then upgrading my test instance. |
346 first restoring a dump from the production site, then upgrading my test instance. |
347 |
347 |
348 To generate a dump from the production site: :: |
348 To generate a dump from the production site: :: |
349 |
349 |
350 $ cubicweb-ctl db-dump sytweb |
350 $ cubicweb-ctl db-dump sytweb_instance |
351 pg_dump -Fc --username=syt --no-owner --file /home/syt/etc/cubicweb.d/sytweb/backup/tmpYIN0YI/system sytweb |
351 pg_dump -Fc --username=syt --no-owner --file /home/syt/etc/cubicweb.d/sytweb/backup/tmpYIN0YI/system sytweb |
352 -> backup file /home/syt/etc/cubicweb.d/sytweb/backup/sytweb-2010-07-13_10-22-40.tar.gz |
352 -> backup file /home/syt/etc/cubicweb.d/sytweb/backup/sytweb-2010-07-13_10-22-40.tar.gz |
353 |
353 |
354 I can now get back the dump file (:file:`sytweb-2010-07-13_10-22-40.tar.gz`) to my test |
354 I can now get back the dump file (:file:`sytweb-2010-07-13_10-22-40.tar.gz`) to my test |
355 machine (using `scp` for instance) to restore it and start migration: :: |
355 machine (using `scp` for instance) to restore it and start migration: :: |
356 |
356 |
357 $ cubicweb-ctl db-restore sytweb sytweb-2010-07-13_10-22-40.tar.gz |
357 $ cubicweb-ctl db-restore sytweb_instance /path/path/to/sytweb-2010-07-13_10-22-40.tar.gz |
358 $ cubicweb-ctl upgrade sytweb |
358 $ cubicweb-ctl upgrade sytweb_instance |
359 |
359 |
360 You'll have to answer some questions, as we've seen in `an earlier post`_. |
360 You'll have to answer some questions, as we've seen in `an earlier post`_. |
361 |
361 |
362 Now that everything is tested, I can transfer the new code to the production |
362 Now that everything is tested, I can transfer the new code to the production |
363 server, `apt-get upgrade` cubicweb and its dependencies, and eventually |
363 server, `apt-get upgrade` cubicweb and its dependencies, and eventually |