Here is how.
1. Install OSCAR on the new server using the new Ubuntu 10.04/OSCAR 9.12 guide.
2. Make a backup of your OSCAR files on your old server as per the 'how to update your version of OSCAR' post.
3. Transfer your most recent backup to the new machine.
Unpack the backup files - there are two: the MySQL dump of your database data, and the OscarDocuments folder with all the uploaded documents, eForms etc..
Drag the sqldump file and the oscar_mcmaster folder from the OscarDocuments folder to the new server desktop.
4. Move the oscar_mcmaster folder over to the tomcat folder:
sudo mv $CATALINA_BASE/webapps/OscarDocument/oscar_mcmaster $CATALINA_BASE/webapps/OscarDocument/oscar_mcmaster.old
sudo mv ~/Desktop/oscar_mcmaster $CATALINA_BASE/webapps/OscarDocument/
5. Restore the backup database to the new server
First backup the database that is in the new install of oscar:
mysqldump -u root -p[rootpassword] --databases oscar_mcmaster > ~/Desktop/new_install_oscar_database.sql
log into mysql as root
mysql -u root -p[rootpassword]
Delete the original databasemysql> DROP DATABASE oscar_mcmaster;
Then create the new database:
mysql> CREATE DATABASE oscar_mcmaster;
Then grant the necessary privileges to your two new users:
mysql> GRANT select ON oscar_mcmaster.* TO OscarRead@localhost IDENTIFIED BY '[password1]';
mysql> GRANT select, insert, update, delete ON oscar_mcmaster.* TO OscarWrite@localhost IDENTIFIED BY '[password2]';
mysql> GRANT all ON oscar_mcmaster.* TO root@localhost IDENTIFIED BY '[rootpassword]';
Now log out as root from MySQL:
mysql> exit
Then restore the mysql data to the new database:
mysql -u root -p[rootpassword] oscar_mcmaster < ~/Desktop/oscarbackupfile.sql
7. Update the oscar.properties file with the data from your original server - you'll need to go through both files to transfer across key data from your old server by hand.
sudo vi $CATALINA_HOME/oscar.properties
6. If the version of OSCAR has been updated, then you will need to follow the second half of the instructions on how to update OSCAR regarding updating the database tables to the new version.
