A Third Way For Backup

cverk wrote on Wednesday, March 06, 2013:

You may need to check which version of apache you are using as I have updated to the more recent one 2.4.  You may have version 2.2 and need to change that command. You could also try putting the check.bat file on the f drive and change the cd command and if exists command to the f drive.

fsgl wrote on Wednesday, March 06, 2013:

Using Kevin’s prescription, I add the following to the third line: \users\fsl\desktop.

From the horse’s mouth:

C:\Users\fsl>cd desktop

C:\Users\fsl\Desktop>dir backup.cmd
Volume in drive C has no label.
Volume Serial Number is 7072-AB90

Directory of C:\Users\fsl\Desktop

File Not Found

C:\Users\fsl\Desktop>backup.cmd
‘backup.cmd’ is not recognized as an internal or external command,
operable program or batch file.

C:\Users\fsl\Desktop>cd desktop
The system cannot find the path specified.

C:\Users\fsl\Desktop>

Using cverk’s prescription, I sent the check.bat file to F-drive, deleted it in C-drive, changed the cd command to F:, dug about in the Apache folder to find the version and changed the version to 2.0.  Double clicking merely opened the script.  I was hoping that all this would so easy that even the family dog could do it but it is not proving to be the case. The good thing about this exercise is that I serve as the guinea pig so that all the kinks can be worked out before posting to the Wiki.

fsgl wrote on Wednesday, March 06, 2013:

Tried a third approach:

1) put check.bat back in C-drive, deleting it in F-drive
2) changed the cd command back to C-drive
3) moved the script to C-drive, so that it is right under Windows’ nose so to speak, hoping that it will have easier time finding it.

Still no luck.  I may have to give TechRepublic that pound of flesh, after all.

yehster wrote on Wednesday, March 06, 2013:

I think the problem is that when you saved the script file, it didn’t save in the way/location that was intended.
My next suggestion is this…
Open the script up in notepad again.
Then do File > SaveAs
At the bottom make sure that you change the Save as Type to (All files)
Then for file name, type in a full path and name like
C:\users\fsgl\desktop\backup.cmd

The “file not found” when you did dir before confirms that the file isn’t where I thought you saved it to based on your descriptions thus far.  I’m hoping that saving the file with an explicit path eliminates some of the confusion.

When saving script files with notepad, it is important to specify the “Save as type”  as otherwise notepad appends a “.txt” extension.

After you’ve tried saving the script file with notepad again, try the “dir commands” and running from the command prompt again.  If you still get “file not found” the problem is how you are trying to create the script file in the first place with notepad and not about the command line itself.

blankev wrote on Wednesday, March 06, 2013:

Here are some options:

1. Check that the file is in the correct folder. With the CVERK options there are two files and two folders to check! Use that Folder name and exact file name in the script.
2. net stop and net start only work with the correct version name. You have to check the open SERVER folder in Windows open XAMPP and click on tab Win-Services
3. Put the pause  between all lines of the script
4.This way you have to find the problem.
5. Also be sure to use the exact characters as prescribed in the CVERK example. One comma of space  to much make it a failure.
6. Count your blessings and if you have enough it MUST work. Even for U.
7. Do an easy XCopy for a file to be sure XCopy is on your computer. To do this Click start, Click RUN, Click cmd and an dos window will open. There you can do the XCOPY work line by line. To leave the window type exit or close with the right top X mark.

fsgl wrote on Wednesday, March 06, 2013:

LAUS ET GLORIA IN EXCELSIS YEHSTERO (Praise and glory to Yehster in the highest!!!) (There are no punctuations in Latin.)

الله رحيم (Allah Kareem, God is merciful)

The problem was, indeed, in the construction of the backup.cmd.  I chose the the default file type as .txt (because I did not know any better) and did not use the drop down menu to select “All files” which did not permit the text file to be converted into a command file.

The entire XAMPP directory was copied to F-drive and then to the Windows XP desktop for restoration/verification.  The desktop is named “fredonia” while the laptop is named “fun”.  I used “fredonia/openemr/interface/login/login_frame.php?site=
default” to launch OpenEmR, which did not work.  I also used “fun” at the begining of the URL, but it also did nothing.  Only the laptop has been used for OpenEMR. When I first set it up for the laptop, no provisions had been made for other computers or sites.  There is no reason to use a second computer except for verification.  No tinkering is remotely contemplated.

Now on to the task of figuring out how to open the copy of OpenEMR in the desktop.

Thank you, gentlemen one and all, for your kind assistance.

blankev wrote on Wednesday, March 06, 2013:

Fredonia and Fun, I like your computers. I had the same problem. I renamed a working copy on Fun and named the folder Xampp20130305. On the same day I did xcopy the Fredonia Xampp resote to Fun making another XAMPP folder on Fun. Next thing was to restart Fun, but it showed ma that XAMPP did not want to do its wrok as stipulated. XAMPP had problems starting.

SO I deleted the new  XAMPP and renamed XAMPP20130305 into XAMPP. Still did not wanted to do anything, but a slight difference in the XAMPP starup situation. Today to my surprise it worked as ik nothin happened…… MIRACLES DO HAPPEN I suppose. So now I can work again with Fredonia and Fun… but the XAMPP directories are still not jet the axact copies of each other.

Any thoughts?

TNX in advance.

blankev wrote on Wednesday, March 06, 2013:

Probably you did find why: **right click the cmd **or bat file and run it as Administrator!

Took me some time before I remembered I had the same problem. That’s how I discovered the solution of the desktop-start and changes to make and run it as administrator.

cverk wrote on Wednesday, March 06, 2013:

I think the copy would work if you copy it to the C drive as C:\xampp and run from your browser as http:// localhost/openemer.  You have to make sure to run the xampp control program found under the xampp folder as xampp-control.exe  and turn on mysql and apache. If you are lucky you could probably run the xampp control from the f drive and turn on mysql and apache and run openemr directly from your usb drive.Xampp control will also tell you the apache version you are using.
    When they released the newer 4.1 openemr version I installed a new copy of the xampp installer and used sql dump to get my older data out and import it to the newer version.  I also copied in the scanned documents.  This allowed me to use the new xampp version with apache 2.4.That would be the kind of thing you would want to try with your test version first. There are many security updates to the newer xampp and I have followed that discussion closely and tried to harden my office server as much as possible as I am kind of paranoid in that respect.  Thus the noted extensive use of file encrypting for transport.

fsgl wrote on Thursday, March 07, 2013:

الله أكبر  (Allah Akbar, God is Great)

I had forgotten to install both Apache & MySql by clicking the red  x’s to change them into green checks and then start both services.  The fredonia url worked fine after that.

The backup copy, using the cverk script, on fredonia had only 1 hiccup.  Scanned copies of visual fields had to be coaxed back from “Document” into Nation Notes within the Layout Based Value forms.  But it started to be a little buggy yesterday before  the backup, so it is not a criticism of the cverk script.

In addition to the built-in backup utility and the cverk script, I did a copy and paste of the /sites/default folder and the mysql folder.  It is only 18 MB and took 30 seconds to do.  I would feel more secure with 3 different types of backups rather than 3 copies of the same backup.

cverk, after I have gained more experience with your script, I would be very pleased to write the Wiki article if you are too pressed for time.  We should know your real name so that your contribution will be properly acknowledged.  If you are too moderate, we will have to use your avatar instead.  For physicians like myself, I could not make heads or tails of Joe Holzer’s article.  If written in the style of the Dummies series, it will help a lot of us beginners.

Pimm, are you old enough to know about the Marx Brothers’ Duck Soup? Groucho played Rufus T. Firefly as the fearless leader of Freedonia (“Hail! Hail! Freedonia, Land of the Brave and Free!”).  Have fun with the video.

fsgl wrote on Thursday, March 07, 2013:

I meant to write: If you are too modest, we will have to use your avatar instead.  One of these days, I will have to learn   how to edit a post after sending it off.

robertrambo wrote on Thursday, March 07, 2013:

schtasks /create /sc <ScheduleType> /tn <TaskName> /tr <TaskRun> [/s <Computer> [/u <User> ]] [/ru {<User> | System}]   [/d <Day> | *] [/m <Month>]    [{/et <EndTime> | /du <Duration>} ]    

cd /
xcopy /xampp/customized folders / (destination) add switches
pushd?
popd?
verify ?
cipher ? /xampp/ (PHI) just sayin :wink: would be nice

yehster wrote on Thursday, March 07, 2013:

I will have to learn how to edit a post after sending it off.

There is no way in sourceforge to edit posts.  This is one of the most frequent complaints about these forums.  The search capabilities aren’t that great either, and there isn’t capacity for “sticky” post for frequent questions/issues.  Many of us have wished for a better forum, but it’s not such an easy thing to do.

robertrambo wrote on Thursday, March 07, 2013:

windows and nix hourly backup (has anyone used this ? locally and remotely!
rsync -e ssh -va -link-dest=$dst/hourly.1 $remoteserver:$remotepath $dst/hourly.0

rsyncrypto is a utility to encrypt files in an rsync-friendly fashion. The rsyncrypto algorithm ensures that two almost identical files, when encrypted with rsyncrypto and the same key, will produce almost identical encrypted files. This allows for the low-overhead data transfer achieved by rsync while providing encryption for secure transfer and storage of sensitive data in a remote location?

robertrambo wrote on Thursday, March 07, 2013:

Just wanted to share this
http://www.ama-assn.org/resources/doc/psa/hipaa-phi-encryption.pdf

cverk wrote on Thursday, March 07, 2013:

Here is a link to the forum outlining a similar 256 encrypted backup to the Amazon S3 cloud service. I also use their server side encryption, so at rest in the cloud it is encrypted twice with different passwords. I am glad to read the new hipaa rules you linked to because the old rules just left you out to dry no matter how many precautions you took.

http://sourceforge.net/projects/openemr/forums/forum/202504/topic/5288211

robertrambo wrote on Thursday, March 07, 2013:

Hi cverk

I looked at your file protection and back up scheme … very nice!
dgsync.exe what a great program the gui is great, from the screen shots
I will have to take it for a spin.
It beats all the configuration of a batch!
Now your covered against lightning fire hackers hipaa etc…

You think there is a chance of getting this or something similar into the main trunk?

-Rob

fsgl wrote on Thursday, March 07, 2013:

Kevin, thanks for the information about editing a post.  I will have to do more proofreading before hitting the “Add Reply” button.  I have participated in our Academy’s forum and that for Boglehead.org.  Both have the ability for editing while Boglehead. org has sticky posts.  We pay dues to the Academy.  The Boglehead forum is owned by an individual who tends it from his home in Chicago, I believe.  Three or four years ago there were signs of monetizing starting to appear. Uing the Google search bar is much easier than the one within the forum.  Open source will not give us the deluxe model unless someone is willing to devote the time and effort to bring it to fruition. The OpenEMR project, itself, is a great example that open source can be top of the line.    When I joined this forum last summer, there were no BBCode buttons, so that is an improvement.  Good things come to those who wait.

cverk, so you did author the Wiki article about backup to the cloud.  Your post above provided the link to setting up a Wiki account, thanks.  “See one. Do one. Teach one.”  OK, I will respect your implied wish for anonymity.

The issue of the security of our electronic medical records is a very troubling one.  The typical solo practice does not have the means to adequately secure its EHR.  Our local university has an entire IT Department housed in in its own building and I am sure they get hacked into from time to time.  Even if I update and harden the Apache server and work offline all of the time, enabling patient portals will be tantamount to putting out a welcome mat for all miscreants.  Patient portals must be the idea of some young Congressional staffer who does not know what (s)he is talking about.  I am heartened by the fact that the American Academy of Ophthalmology is pushing back in Washington against the possibility of it being mandated in stage 2 of Meaningful Use.

fsgl wrote on Thursday, March 07, 2013:

Just emailed the powers that be about adding an edit button to this forum.

We will see if they will humor an old person.

fsgl wrote on Friday, March 08, 2013:

Rich Bowen, of SourceForge Support wrote this:

“OpenEMR is  currently running the “classic” version of our project hosting software, and, as such, we’re not really able to perform any enhancements to their forums. If you have any sway in the community, you might lean on them to upgrade their hosting to the new SourceForge platform, where such feature enhancements are being done regularly.”

Well, fellas, ball is in your court.