Backup (was Upgrading Issues:)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Backup (was Upgrading Issues:)

Peter Hutten-Czapski-2
.... further clarification on the use of the backup script for OSCAR 15

The default backup run by the DEB can be viewed on your /usr/share/oscar-emr directory or on line at

The backup does a database schema backup nightly.  The "full backup" is a one encrypted and compressed file that contains oscar.properties, your OscarDocuments (with the exception of the cache directory), your current oscar.war, and the backup script itself.  The drugref.war and its schema are NOT backed up (they contain no user data)

The default behavior of the script is to do a full backup nightly unless there is a full backup already on disc.  In that case it does the full backup every 20 days although you can set a different number of DAYS_TO_KEEP in oscar.properties)

You can force the complete full backup by invoking the script with a -c flag as in backup.sh -c 
Other flags you can set are 
f) PROPFILE="$OPTARG";;
n) NO_GZIP_MYSQLDUMP_FLAG=1;;
r) REMOTE_UPLOAD_FLAG=1;;
c) COMPLETE_BACKUP=1;;
u) db_username="$OPTARG";;
p) db_password="$OPTARG";;
d) DATABASE="$OPTARG";;
b) BASE_DOCUMENT_DIR="$OPTARG";;
t) TMPBACKDIR="$OPTARG";;

Unless you set a different PROPFILE in the flags the script will search the oscar.properties file for settings for the following keys and their values

db_name=
backup_path=
BACKUPSERVERS=
COMMON_BACKUPSERVER_PORT=
db_username=
db_password=
BASE_DOCUMENT_DIR=
DAYS_TO_KEEP=


The regular backup still does a full database backup nightly.  Its only the documents that are incrementally saved, and even then its all the documents since the last full backup.  Thus only three files are needed to restore.  The last full backup, the latest database backup, and the latest incremental document backup.

On the first of the month the backup script will copy a backup to the archive directory.

If the remote upload flag is set (eg backup.sh -r ) then each backup server mentioned in the properties file for the key BACKUPSERVERS
gets rsynched

In our case our schema backups nightly at 2G, we get the default full backup every 20 days at 20G.  I have 124MB of compressed documents newer than our full backup of April 11th.


================
Peter Hutten-Czapski
Haileybury Ontario

"The attitude that ‘if rural people want these services they’ll have to come to the city to get them’ is simply not acceptable…” (Newbery, 1999)

Before printing, think about the environment. Avant d' imprimer, pensez à l'environnement.

On 18 April 2017 at 08:27, Peter Hutten-Czapski <[hidden email]> wrote:
I can speak to the packaging (DEB) that installs the scripts.

When the new backup script was written for 15 it was set up so that
you could trigger a full backup, or use an incremental one to limit
disc space.  When restore.sh was repackaged for 15 it was designed for
restoring just the simple case.  Thus this behavior is as designed,
and your approach of manually merging in is appropriate.

As the DEB will update the schema automatically and the vast majority
of schema changes are designed to be backwards compatible within a
given OSCAR version, there is rarely need to restore the database,
much less the documents, unless you are rebuilding a server.

I will consider this an issue that can warrant enhancement of
restore.sh to handle incremental files, and will see if I can find
time for it.


================
Peter Hutten-Czapski
Haileybury Ontario

"The attitude that ‘if rural people want these services they’ll have
to come to the city to get them’ is simply not acceptable…” (Newbery,
1999)

Before printing, think about the environment. Avant d' imprimer,
pensez à l'environnement.


On 17 April 2017 at 23:26, maveric <[hidden email]> wrote:
> Also, when I use the restore.sh script I find that it will only have the
> database populated until when the last Full backup was.  In stead I used the
> terminal sql command, replaced the database, and merged both the incremental
> and full document files with the one located in the
> usr.share/oscar-emr/oscardocument folder.  Am I doing something wrong for
> new debs?  I am happy that I can restore but it's frustrating that I am not
> having any access to new debs.
>
> It seems that many components after 503 for my database won't work properly.
> Documents will not open, forms won't be present, and it's showing errors
> when I click the Rx button.
>
>
>
> --
> View this message in context: http://oscarmcmaster.16.x6.nabble.com/Upgrading-Issues-tp5009640p5009642.html
> Sent from the oscarmcmaster-devel mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oscarmcmaster-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/oscarmcmaster-devel
>


Virus-free. www.avg.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oscarmcmaster-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/oscarmcmaster-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup (was Upgrading Issues:)

maveric
This post was updated on .
BACKUPSERVERS=

I'm unable to find this value in the oscar.properties file.  Am I looking in the wrong area?  Also, when I restore an instance of OSCAR, I am assuming I have to replace the oscar_backup.sh file in the extracted folders from decrypting over the default one in /usr/share/oscar-emr?  Although I am content with downloading the backups before the end of the day, I can forget and wish I had it sent to my server at home automatically.  My home server is Windows-based.  Any recommendations on how to set this up?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Backup (was Upgrading Issues:)

Peter Hutten-Czapski-2
Note that an automated backup script to an offsite server protects you from 
hardware failure
fire
flood
physical theft
and human incompetence (I forgot to download the backup)
but does not protect you from corruption from viruses ransomware
AND NEEDS TO BE TESTED TO ENSURE IT WORKS


the key is BACKUPSERVERS
the value is user@IP4:path
BACKUPSERVERS=user@IP4:path
you place the key and its value in oscar.properties where the backup script looks for it
The value pattern that you give it is documented with examples in the backup script
BACKUPSERVERS= user@192.168.1.151:~/backup/ [hidden email]:~/backup/


There are bits of Ubuntu that are installed in Windows 10, or you can install a VM, or you can use some *nix tools that are ported, or you can use windows native tools.
================
Peter Hutten-Czapski
Haileybury Ontario

"The attitude that ‘if rural people want these services they’ll have to come to the city to get them’ is simply not acceptable…” (Newbery, 1999)

Before printing, think about the environment. Avant d' imprimer, pensez à l'environnement.

On 22 June 2017 at 21:55, maveric <[hidden email]> wrote:
BACKUPSERVERS=

I'm unable to find this value in the oscar.properties file.  Am I looking in
the wrong area?  Also, when I restore an instance of OSCAR, I am assuming I
have to replace the file in the extrated folders from decrypting over the
default one in /usr/share/oscar-emr?  Although I am content with downloading
the backups before the end of the day, I can forget and wish I had it sent
to my server at home automatically.  My home server is Windows-based.  Any
recommendations on how to set this up?



--
View this message in context: http://oscarmcmaster.16.x6.nabble.com/Backup-was-Upgrading-Issues-tp5009659p5009820.html
Sent from the oscarmcmaster-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oscarmcmaster-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/oscarmcmaster-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oscarmcmaster-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/oscarmcmaster-devel
Loading...