# How to restore

**URL:** <https://community.open-emr.org/t/how-to-restore/3862>\
**Category:** Day-to-Day Users\
**Created:** [January 18, 2014, 6:41pm UTC](https://community.open-emr.org/t/how-to-restore/3862 "2014-01-18T18:41:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 18, 2014, 6:41pm UTC](https://community.open-emr.org/t/how-to-restore/3862/1 "2014-01-18T18:41:09Z")

</div>

**[engrsameen](https://sourceforge.net/u/engrsameen/)** wrote on [Saturday, January 18, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#40a3):

u create but a backup but how do u restore it

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 18, 2014, 7:51pm UTC](https://community.open-emr.org/t/how-to-restore/3862/2 "2014-01-18T19:51:00Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Saturday, January 18, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#752c):

See [this web page](http://www.open-emr.org/wiki/index.php/OpenEMR_Backup_Tools).

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 2:41pm UTC](https://community.open-emr.org/t/how-to-restore/3862/3 "2014-01-29T14:41:24Z")

</div>

**[hitechelp](https://sourceforge.net/u/hitechelp/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#7208):

I’m not finding anything in the above link (or searching wiki) about restoring the native backup to Ubuntu. Am I missing something or just not searching in the right place?

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 3:40pm UTC](https://community.open-emr.org/t/how-to-restore/3862/4 "2014-01-29T15:40:59Z")

</div>

**anonymous** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#7b5d):

Here’s a brief step-by-step on how we restore to Ubuntu Server. To state the obvious, it’s highly recommended that you perform these steps in a test environment before restoring to a production server.

1. Create backup from Administration \> Backup

2. Move the .tar backup file to a desired location on your server (e.g. home directory)

3. Copy the restore script from /openemr/contrib/util/ to another location on the server (e.g. home directory)

4. Delete the openemr directory from /var/www/

5. Run the restore script and proceed as prompted

If you’re having trouble with any of these steps, let me know and I’ll try to help walk you through in a little more detail.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 3:44pm UTC](https://community.open-emr.org/t/how-to-restore/3862/5 "2014-01-29T15:44:56Z")

</div>

**[blankev](https://sourceforge.net/u/blankev/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#bb99):

Backup is for Linux… (Ubuntu)

Restore is a different page.  
Could try to follow this INFO for Windows…

[http://www.open-emr.org/wiki/index.php/Windows\_Backup\_And\_Restore\_Made\_Easy](http://www.open-emr.org/wiki/index.php/Windows_Backup_And_Restore_Made_Easy)

(or go to the User Guide Version X.X.X)

There is a page if these pages do not give your solution. Making a backup makes a backup of everything. Restore is most of the time just a part of the Back-up you need. Probably there is also a page in the FAQ of OpenEMR on Restore.

Ubuntu is more intuitive than the Windows Restore.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 3:50pm UTC](https://community.open-emr.org/t/how-to-restore/3862/6 "2014-01-29T15:50:00Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#1772):

“There is no restore script yet, will have to be done manually.”

You will have modify [this](http://www.open-emr.org/wiki/index.php/Windows_OpenEMR_Restore_using_emr_backup.tar) or [CVerk’s method](https://sourceforge.net/p/openemr/discussion/202504/thread/1be0cbd9/#656b) for Ubuntu.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 3:54pm UTC](https://community.open-emr.org/t/how-to-restore/3862/7 "2014-01-29T15:54:40Z")

</div>

**[blankev](https://sourceforge.net/u/blankev/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#0642):

Let me know if this Ubuntu Restore solves the problem so we can include it in the correct WIKI pages. (Sorry to have made some remarks that are unneeded with the remarks of Frankie Brooks.)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 5:02pm UTC](https://community.open-emr.org/t/how-to-restore/3862/8 "2014-01-29T17:02:07Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#5441):

Official Ubuntu Server documentation on [recovery](https://help.ubuntu.com/community/BackupYourSystem#Recovery).

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [January 29, 2014, 5:30pm UTC](https://community.open-emr.org/t/how-to-restore/3862/9 "2014-01-29T17:30:29Z")

</div>

**[hitechelp](https://sourceforge.net/u/hitechelp/)** wrote on [Wednesday, January 29, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#5a08):

No worries Pieter,  
We’ve been running two years on Ubuntu and fast approaching 1,200 patients with no issues. Using the native backup in the system remotely is a breeze and I’ve never had to restore one, but as most are well aware, a backup is only as good as your ability to restore it. I have an identical server (same hardware setup) on the shelf in case ours takes a dump and I want to try to restore one of the backups on it to prove they’re good. I found the script that Frankie mentioned and I’m going to follow his guidance and use that to attempt a restore. I’ll post the results here, although it may be a few days.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 1, 2014, 9:42pm UTC](https://community.open-emr.org/t/how-to-restore/3862/10 "2014-02-01T21:42:59Z")

</div>

**[mschap](https://sourceforge.net/u/mschap/)** wrote on [Saturday, February 01, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#6ab8):

Okay, I used the back up script that was given in another post as I cannot create a tmp/emr\_backup/openemr.tar.gz

Now went to install (using the restore script after following the above directions) however get:

WARNING: This script is experimental.  
It may have serious bugs or omissions.  
Use it at your own risk!  
Now you will be asked for the backup file.  
By default this is named emr\_backup.tar, although you may have saved it as something else.

Enter path/name of backup file: /home/alpinehealth/openemr/emr\_backup.tar

Extracting /home/alpinehealth/openemr/emr\_backup.tar …  
Extracting /tmp/emr\_backup/openemr.tar.gz …  
tar (child): …/openemr.tar.gz: Cannot open: No such file or directory  
tar (child): Error is not recoverable: exiting now  
tar: Child returned status 2  
tar: Error is not recoverable: exiting now  
Error: tar could not extract ‘/tmp/emr\_backup/openemr.tar.gz’.

There has to be something that has changed in Linuxmint (13 on) in the last number of months which is creating these problems - I cannot recover over 200 patients and I am concerned that I may not be able to fix this properly. I hate putting anything into the existing computer when I cannot properly backup du to this tmp error and nor can I do a restore for the same reason.

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [February 2, 2014, 4:57am UTC](https://community.open-emr.org/t/how-to-restore/3862/11 "2014-02-02T04:57:45Z")

</div>

**[jackfruit501](https://sourceforge.net/u/jackfruit501/)** wrote on [Sunday, February 02, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#db85):

I wonder if it is acceptable method of backup and restore the whole Os including openemr in the /var/www /openemr folder in Ubuntu or /var/www/html/openemr folder in fedora using Acronis Media. I have been doing this for testing purpose but it is a little time consuming.

I have also tried a direct copy of /var/www/html/openemr in Fedora as root to an external HardDisk and just copy it back its original location when the test openemr is screwed up. Just don’t screw up mysql or phpmyadmin or you may not be able to recover the original openemr.

I have been quite happy with these methods as I find them simple and so far have restored with no errors.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 1:08pm UTC](https://community.open-emr.org/t/how-to-restore/3862/12 "2014-03-19T13:08:18Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#9467):

Has anyone used the resident backup utility in Linux Mint 16 just for OpenEMR? Is recovery simply a matter of deleting the corrupted copy and restoring the backup from a medium?

For recovery of the entire hard disk drive, will a Linux Rescue CD be required as in a Windows environment?

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 6:47pm UTC](https://community.open-emr.org/t/how-to-restore/3862/13 "2014-03-19T18:47:01Z")

</div>

**anonymous** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#d31b):

Correct me if I’m wrong, but I believe the SQL database is stored outside of the OpenEMR directory. If that is the case and you’re not doing an SQL dump along with your directory backup, you’ll be missing a ton of information on restore.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:06pm UTC](https://community.open-emr.org/t/how-to-restore/3862/14 "2014-03-19T20:06:52Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#9aa3):

Attached is the screenshot of the OpenEMR directory. Apache2 and MySql folders are found in /etc. Unlike in Windows, where everything is centrally located in the xampp directory; in Linux, folders seem to be widely dispersed.

I was wondering if the resident backup utility would gather everything together belonging to OpenEMR and then image it as a collective whole rather than separate folders in a disjointed fashion. If this is the case, then we have another method for the crucial task of backup/recovery.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:12pm UTC](https://community.open-emr.org/t/how-to-restore/3862/15 "2014-03-19T20:12:44Z")

</div>

**[blankev](https://sourceforge.net/u/blankev/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#9aa3/407e):

Seems like a great idea, but will it also work with a an OpenEMR in use? Or do you have to stop all activities on OpenEMR/MySQL to make a real safe Back-up download?

For “Localhost”, I know usually you need to STOP Apache and MySql for a complete back-up. For a Linus or Windows Server there might be other complications.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:28pm UTC](https://community.open-emr.org/t/how-to-restore/3862/16 "2014-03-19T20:28:48Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#9aa3/407e/b40f):

Should stop/restart be required, it’s a small price to pay for a decent backup without resorting to the use of the Terminal.

Not a lot of online information about it, except that it’s slow backing up to a flash drive especially if videos are in the home folder.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:47pm UTC](https://community.open-emr.org/t/how-to-restore/3862/17 "2014-03-19T20:47:17Z")

</div>

**anonymous** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#e89f):

Are you having issues with the native OpenEMR backup/retore process or just looking for a complimentary solution for backing up other data? I find OpenEMR’s backup/restore scripts to be the most effective method for our small practice. Although the command line may seem daunting at first, there are only two or three commands necessary to complete a restore, all of which become second nature after a few tries.

The problem with using Mint’s native backup tool is the database dump. Unless you manually dump the database file prior to the sync, crucial data will be missing from your backup. All of this is automated in the OpenEMR backup script. Here’s are a couple articles that touch on MySQL backup:

[http://www.techflirt.com/mysql-incremental-backup-restore/](http://www.techflirt.com/mysql-incremental-backup-restore/)

> **[10 Ways to Automatically & Manually Backup MySQL Database | The Jotform Blog](https://www.jotform.com/blog/how-to-backup-mysql-database/)**
>
> How to Backup MySQL Database
> Open phpMyAdmin from your web hosting control panel like cPanel.
> Select the database from the sidebar navigation panel of phpMyAdmin.
> Click the Export link from the top navigation bar.
> Choose Custom option in the Export...

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:49pm UTC](https://community.open-emr.org/t/how-to-restore/3862/18 "2014-03-19T20:49:04Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#263f):

[This webpage](http://www.maketecheasier.com/backup-your-applications-with-a-single-command/) answered my question. The applications backup is only a _list_ not the actual application with all its modifications/customizations. Essentially it will go to SourceForge and install a brand new copy of OpenEMR and that’s it. Tantalizing thought if only evanescent.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 8:54pm UTC](https://community.open-emr.org/t/how-to-restore/3862/19 "2014-03-19T20:54:40Z")

</div>

**anonymous** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#a9ab):

Hmm, I must have been looking at the wrong software. The thumbnail you posted was for [mintbackup](http://community.linuxmint.com/software/view/mintbackup). The software I was referencing was [luckybackup](http://community.linuxmint.com/software/view/luckybackup). The latter looks to be based on rsync which will sync designated files and folders.

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [March 19, 2014, 9:24pm UTC](https://community.open-emr.org/t/how-to-restore/3862/20 "2014-03-19T21:24:29Z")

</div>

**[fsgl](https://sourceforge.net/u/fsgl/)** wrote on [Wednesday, March 19, 2014](https://sourceforge.net/p/openemr/discussion/202504/thread/9f866449/#7da2):

Thanks for your help.

Our production copy is on a Windows 7 machine. CVerk’s backup script has worked flawlessly.

Just exploring in the newly installed LM 16 and planning well in advance for the eventual end of support for 7, by which time the commandline will be a part of daily life.

It’s starting to become fun. Now, if I could only get the hang of Gimp…

[Next page](https://community.open-emr.org/t/how-to-restore/3862.md?page=2)
