Moving data to new computer

 Hi,  please excuse my complete ignorance!

I've just installed Openvpms on a Windows 8 computer. I'd like to transfer the exisiting openvpms database from my current Windows 7 laptop.

Is this something that can be done via the Mysql administrator/workbench, ie can I simply restore a database using the back ups that I have made?

Or is this a job for someone smarter than me :)

 

cheers

 

Dave

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Moving data to new computer

Dave - there are two ways to do this: restoring the raw mysql files from the backup or by taking an sql dump on the Win 7 machine and restoring this on the Win 8 machine.

The second is probably less prone to gotcha's (like changes in the MySQL versions between the two machines).

In the 1.8 version of the CSH text we have added a 'how to backup' section - see http://www.openvpms.org/documentation/csh/1.8/topics/how/backup [although this is in the 1.8 CSH text, it is perfectly applicable to any version of OpenVPMS].

Read though this and see the mysqldump dump section - which gives the recipies for both creating the dump and restoring it.

Depending on how much of the installation steps you have done in installing OpenVPSM on your Win 8 machine, you may or may not have the openvpms database created. Section 1.4 of the readme.txt says:

1.4 Database setup

  To create the OpenVPMS MySQL database, run the following in a shell prompt
  > cd <OPENVPMS_HOME>/db
  > mysql -u admin -p < createdb.sql
  > mysql -u admin -p openvpms < db.sql

  NOTES:
  * replace 'admin' with a user that has administrator privileges in MySQL.
  * the createdb.sql script creates an 'openvpms' user that only has
    privileges to connect from localhost.

You need to do the "mysql -u admin -p < createdb.sql"  to create the database before using "mysql -u admin -p openvpms < mywin7-mysqldump.sql" to restore your database.  If you have already used the 2nd step to restore from db.sql, don't worry, restoring from your win7 mysqldump output will ovewrite what came in from db.sql

By the way, don't forget to adjust the mysql settings (as per the last part of section 1.1 Requirements) which says

  - include the following lines in my.ini
    max_allowed_packet=16M
    innodb_file_per_table

[I screwed up recently doing what you are doing, and omitted this and the restore failed and initially I could not understand what I had done wrong.]

Regards, Tim G

 

Re: Moving data to new computer

Thanks Tim,

 

will have a go and see what happens!

 

cheers

 

Dave

Syndicate content