How to move database/OEMR to a new server

cpbdman wrote on Wednesday, November 10, 2010:

I have limited server knowledge, but we have IT guy- so I may not understand all the language, but with insructions I can pass it along! We’re divorcing our old IT guy and he may hold our server hostage. We may need to buy a new server and I need to know how to transfer OEMR/data to the new server (i.e. pt demos, encounters, superbill info, practice info etc), basically all the info. If we can transfer OpenEMR as a whole, great. But if we should just install a new version and upload the pt database into it, that’ll be fine. I’d rather avoid filling in superbill, address book, all the admin stuff etc- but can if we have to. Or would that all come over somehow?
If someone has an answer I can understand, great, but if answer is unavoidably over-my-head-techno, that’s ok. I’m hoping we’d just install a new emr on new server and download/upload a full backup (from existing emr) into new one… (right)?
BTW, when I go to Database link under Admin I get ‘you do not have access to this resource’, but the owner/MD does (unfortunately he knows less about computers than I do so….). When I go to Backup under admin, I can make it backup, but there are no options for destination etc.
Thank You thank you thank you if someone can help, or at least get me started in the right direction.

cpbdman wrote on Wednesday, November 10, 2010:

OK, found our backup file. Hope maybe we can install OEMR on new machine and just restore from this backup…? How would I do that?

sunsetsystems wrote on Wednesday, November 10, 2010:

Having the backup file is very good.  What version of OpenEMR is it, and what OS is on your new server?

Rod
www.sunsetsystems.com

cpbdman wrote on Wednesday, November 10, 2010:

OEMR version 3.2.0. Server is WinServer 2003 standard.
We were planning on download install latest version OEMR, ‘upload’ backup from current….

sunsetsystems wrote on Wednesday, November 10, 2010:

There is a restore script for Linux, but for Windows it must be done manually.  Perhaps a more Windows-oriented developer could chime in and explain the procedure.

Rod
www.sunsetsystems.com

drgoody wrote on Thursday, November 18, 2010:

This following thread has been very helpful to me in restoring the database from the linux VM to the XAMPP 3.2 on server2k3.
https://sourceforge.net/projects/openemr/forums/forum/202505/topic/3549521
The only issue I am finding and I’m sure there is a solution is the HTTPS can only be called up from localhost. Port 80 (http) has no problem on other computers on the internal network. I’m guessing it is an IIS issues, but I have not found the problem yet.
Good luck.

medsupporter wrote on Monday, November 22, 2010:

More to the point, you “IT guy” cannot, by law, hold any healthcare data such as that stored in OpenEMR “hostage” as you mentioned.
They are compleled to provide complete and total usable backups to you - and SHOULD be compleled to make the transition smooth with no downtime for you, but that last part is just a moral directive… not a legal one.
Tom

aethelwulffe wrote on Friday, December 03, 2010:

Um….Here is what I do….

If it is the Windows Xampp version I just copy the xampp folder to the new computer( copying the folder AFTER using xampp-control.exe to shut down all the services…cause it won’t copy otherwise, then copy to c:\ on the new drive so it winds up in the correct default path) , and run xampp-control.exe, start the service, and log onto localhost/openemr.
  It seems to be that simple. 
I may have previously installed openemr onto the laptop, then deleted the xampp directory leaving behind some registry entries or something that is letting all this work, but someone more in the know can answer that more effectively.  I think you can just go for it.  I do this CONSTANTLY so I can screw around with the database while not endangering the “real” one.

cpbdman wrote on Monday, December 06, 2010:

Thank You for the replies. Our new IT guy figured it out quite easily, just before aethelwulffe’s reply. And did exactly what he suggested! So we beat ya to it, but thanks for the reply and yes, that’s the easiest- and maybe only way.

Yes, illegal for our old IT guy to hold emr hostage, which it looks like won’t be a problem but just because somebody shouldn’t or ‘cant’ do something, doesn’t mean they won’t!

aethelwulffe wrote on Tuesday, December 07, 2010:

Dude!  Congrats!
Proud to have found the easy answer, and prouder yet that you guys got it on your own.

Openemr sure is a good choice;  It lends itself to heavy modification/specialization, comes with plenty of unspecializeds utility for your work flow, and has plenty of great people involved.  I guess your recent happy resolution of this problem really kinda makes you wanna click that paypal donate button, hunh?  :slight_smile:

I’m glad I started recommending and installing this package for folks.
The xampp package is so darn easy to get going, and anything you need to learn to get it going is well worth knowing.  I find that too many medical professionals are not very well educated (lacking any knowledge outside the scope of medicine), and when they become a business owner they must depend heavily on others.  Most often, this makes them paranoid due to lack of understanding, and they often gum up their own works.  Running a business is hard, and you are SUPPOSED to be self serving.  You have got to delegate some very important duties (like day-to-day IT) but you also gotta be involved.  I hope this little incident has given you some more knowledge and confidence in this system, and the fact that OpenEMR comes with a huge gang of smart helpful friends.

klassy wrote on Wednesday, December 08, 2010:

Sorry to join the party late!
i have just installed open emr 3.2 and i’ve been using 3.0 on my old macbook pro.
how do i move my data from 3.0 to 3.2?
i have 2 machines now with different versions of open emr. i use MAC OS X
i also cant figure out where the back up is stored!
please help

aethelwulffe wrote on Wednesday, December 08, 2010:

Hmm… I am a Windows type.  I don’t know much about OS X.

I do recall that I upgraded from2.8 then to 3.0 thento 3.1 and finally to 3.2.

I have never been able to find a backup either.  That led me to just copying the openemr directory and the mysql/data directories for my “Backup”.

For the upgrades in OSX, we are lacking wiki documentation,but I doubt it is all that hard.
  If you are putting it back in the same directory as a previous version, you basically copy some files from a stored copy of the old one onto the new one that is in the original location, then run sql_upgrade.php and acl_upgrade.php to change the databases.

Here is the upgrade wiki:  http://www.openmedsoftware.org/wiki/OpenEMR_Upgrade_Guides

I also would not sweat the UTF-8 characterset upgrade.  You can manually alter your table fields for that at any time.

nthurman wrote on Thursday, December 09, 2010:

If you are using the package in native Mac OS mode then your application files should be located:

/Library/WebServer/Documents/openemr/

and your mysql files should be located:

/usr/local/mysql/data/openemr

If this is your configuration you should be able to perform a dump

mysqldump  openemr >openemr.sql

klassy wrote on Thursday, December 09, 2010:

thank you very much for the tips guys!
i tried following the wiki links but i got an error at the end and couldnt proceed with the upgrade.

how do i do a dump?

nthurman wrote on Thursday, December 09, 2010:

What error did you receive?  Did you verify the location of the mysql and web components (above)?

klassy wrote on Thursday, December 09, 2010:

am at my wits end! i followed the instructions to the letter until i got to the sql upgrade. this is what i got

Warning: opendir(/var/www/openemr/sql) : failed to open dir: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/openemr/sql_upgrade.php on line 149
Cannot read /var/www/openemr/sql

i even allowed all permissions on the upgrade file but no joy!

now i have done a fresh install on a second machine. im trying to import into it the database from the old machine using the same instructions as above. fingers crossed

nthurman wrote on Thursday, December 09, 2010:

Unfortunately I cannot assist you with the XAMPP installation.  If you were trying to install the package as a “native mode” application under the Mac OS I could point you in the right direction.

Someone with XAMPP experience might be able to help.

klassy wrote on Thursday, December 09, 2010:

nthurman thank you very much! this forum didnt post my last message! :frowning:
i succeeded in moving my database, it was quite simple ( speaking in retrospect!!!)
i started a new installation of xampp and openemr 3.2 on a secon machine that has not run emr.
then copied these folders;
documents
edi
era
letter_templates

from old emr 3.0.0.1 and replaced them in the new emr 3.2

then copied entire var folder from the old xampp and replaced the new one

then ran the sql_upgrade and acl_upgrade on the new file and hey presto! all my data is preserved!

thank you for all the support guys!

i hope my narrative is clear enough to help someone else in the same predicament.!!