Changes between Version 30 and Version 31 of SopUpdateBbmriApp
- Timestamp:
- 2013-05-29T14:12:20+02:00 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SopUpdateBbmriApp
v30 v31 25 25 1. If you know the exact changes of the database, compared to the old version in live server, then the migration script is consisted of the commands that synchornize the two versions. 26 26 1. You do not know, you can can compare the mysql dump files between the live and the local version. This is easier if you dump only the schemas (not the data) . 27 1. First ssh to molgenis14, create file & copy it 27 1. First ssh to molgenis14, create file & copy it 28 28 1. ssh molgenis@molgenis14.target.rug.nl 29 29 1. create a dump file: mysqldump --no-data, -d bbmri -u molgenis –pmolgenis > ~/databaseDumps/<date>bbmriDBlive.mysql … … 32 32 1. diff <date>bbmriDBlive.mysql <date>bbmriDBlocal.mysql 33 33 34 === 2.2 copy war file & migration script from your computer to test server ===34 === 2.2 Copy war file & migration script from your computer to test server === 35 35 1. Copy the war file and the mysql migration script from your computer to the server as follows: 36 36 1. scp <filename>.war molgenis@molgenis35.target.rug.nl:./ 37 37 1. scp <migrationScriptFilename> molgenis@molgenis35.target.rug.nl:./ 38 38 39 === 2.3 Export data from LIVE server === 40 === 2.5 Copy data from your computer to test server === 39 === 2.3 Copy live data from your computer to test server === 41 40 1. scp ./mysql<date>LIVEdata.mysql molgenis@molgenis35.target.rug.nl:./databaseDumps/mysql<date>LIVEdata.mysql 42 41 43 === 2. 6Deploy at test server ===42 === 2.4 Deploy at test server === 44 43 1. Ssh to the server: 45 44 * ssh !molgenis@molgenis35.target.rug.nl 46 45 * You are now at /srv/molgenis/ where your files where copied. 47 46 48 === 2.7 Backup === 49 1. '''BACKUP your DATABASE FIRST''': 50 * mysqldump bbmri -u molgenis –pmolgenis > ~/databaseDumps/<date>bbmriDB.mysql 51 * Check the dumbed file if it is not just an error file … 52 53 === 2.8 Insert the data from live server to test server === 54 compare the sql file from test server with the live server. then make a migrationscript and insert this tables into testserver 55 56 === * mysql -u molgenis -pmolgenis bbmri < 29Maydump.mysql === 57 === 58 59 === 2.9 Apply migration steps: === 47 === 2.5 Backup Database === 48 1. mysqldump bbmri -u molgenis –pmolgenis > ~/databaseDumps/<date>bbmriDB.mysql 49 1. Check the dumbed file if it is not just an error file … 50 51 === 2.6 Insert the data from live server to test server === 52 * '''Insert live data (copied from your computer previously) ''' 53 * mysql -u molgenis -pmolgenis bbmri < ./databaseDumps/mysql<date>LIVEdata.mysql 54 55 56 57 === 2.7 Apply migration steps: === 60 58 * mysql -u molgenis –pmolgenis 61 59 * use bbmri 62 60 * <apply mysql commands> 63 * '''Backup & replace the war file on server''': 64 * The war file is in /usr/share/tomcat6/webapps/biobanks.war 65 * cp /usr/share/tomcat6/webapps/biobanks.war ~/warFiles/<date_bbmri.war> 61 62 === '''2.8 Backup & replace the war file on server''': === 63 * The war file is in /usr/share/tomcat6/webapps/biobanks.war 64 * BACKUP : cp /usr/share/tomcat6/webapps/biobanks.war ~/warFiles/<date_bbmri.war> 66 65 * Delete the old *.war (Do NOT stop tomcat; leave it running): rm /usr/share/tomcat6/webapps/biobanks.war 67 66 * Wait a few seconds; Tomcat will notice the *.war is gone and then it will remove the unzipped folder. … … 72 71 * sudo service mysqld status 73 72 74 * Check your deployment at: https://molgenis35.target.rug.nl/biobanks/ 75 76 == ''' The same steps apply to the production server molgenis14 . ''' == 73 = 3. Check your deployment = 74 = * Check your deployment at: https://molgenis35.target.rug.nl/biobanks/ 75 76 = 77 '''The same steps apply to the production server molgenis14 .''' 78 77 79 == '''Appendix ''' == 78 80 * Find miscellaneous issues here: http://www.molgenis.org/wiki/DespoinaLog