Simplicty and flexibility!


Problems with Backup/Restore


Started by Graham Brown
Search
You will need to Sign In to be able to add or comment on the forum!

Problems with Backup/Restore

I am up & working with 8.5.0.2203 and all seems well. I backup and took the program home on a usb stick.

I could not restore. In the origional program I was blown out.

So I opened a New Program, created a Restore Button and tried again.

Every time the same fault:-

Fatal Application Initialisation Error 


Written by Graham Brown 01/03/16 at 08:40:41 Dataease [{8}]FIVE

Re:Problems with Backup/Restore

Hi Graham.


DataEase backup/restore was discontinued in 8.0 (almost the first thing we did…;-)

The reason for removing them was that DataEase backup had not backed up the entirety of a DataEase application for a long time and the most important reason – the compression algorithm change the application so what you get back from a restore is not the application you backed up.

This has in many ways been looked on as a feature in DataEase circles as it cleans up your application, but from a backup (as in security) it is a disaster as you might inadvertently create a problem in your backup which will prevent it from restoring the application properly when you need it.

Our choice in 8.0 was either to change DataEase backup so it would keep up with contemporary standards or discontinue it.

The decision was simple. Discontinue. There is now entire business areas that concentrate on this alone (and do it safely and securely) and there is no need why DataEase should supply their own built in solution.

Secondly the best way to keep a working copy (and bring it with you) is simply to zip down the catalogue containing the DataEase application.

This is in-obtrusive as it will not change any of the files/the application. It will include all the files in the catalogue, and it will make a simple single file container that can be transported and saved anywhere.

It is also quick, so one can do it frequently and hence keep a lot of working copies that one can revert to throughout development.

One can simply copy files from the zipped directory and past it back into the application without any need to “formally” restore the entire application etc.

There has been a lot of reason for including (and removing) features from DataEase over the year but sometimes we have been way to slow in removing outdated features.

One such “feature” is the ability to store more than one application in a catalogue.

This was a “necessity” when there was no catalogues only diskettes A: B: and storage media came at a premium.

The need for doing this went away very early in the DOS range (around DOS 2.0) I think but we didn’t change this until 8.5.

There is no GOOD reason for allowing people to create more than one application in one catalogue, and plenty of GOOD reasons WHY NOT allowing it…but it took close to 30 year for us to block this.

The reason we retained the functions was for backwards compatibility as migrated applications that had used them would get into trouble when migrated if the functions was removed.

In 8.5 the format has been expanded and changed a lot so I guess the Backup/Restore feature no longer has the ability to backup/restore all the necessary files so the time has now come to remove the functions entirely.

Please let us know if there is any other reason for using DataEase backup then the ones stated above.

PS! We are looking into making routines for compacting and cleaning up DataEase applications which there obviously is a need for but they should be “branded” as such and not as something as important as Backup.

____________________________________________


Written by DataEase 01/03/16 at 09:04:22 Dataease [{8}]FIVE

Re:Re:Problems with Backup/Restore

Only 30 years! How time flies I was programming in the first version of DataEase at that time.

Will need to re-think my backup procedures.

All my systems are designed so that the user does not need to know how DE8 works, just press a button. But we backup daily.

If I were to create a button with Execute/Function how would you automate :-


Written by Graham Brown 05/03/16 at 17:53:38 Dataease [{8}]FIVE

Using 7zip as a backup program from inside DE85.

Download Sample

As discussed the built in Backup/Restore was discontinued in 8.0 but the functions was retained for backward compatibility. Now in 8.5 the changes are so extensive that they no longer even work.

As stated a lot of our users use frequent "backups" as security for not loosing data so attached is a sample that will show you how you can do this from inside an application without the need to exit etc.

We have chose to use 7zip simply because it is free, it is compact, it is commandline and it will zip down files that is open in other programs (i.e. DataEase).

Download 7-Zip 15.14 (2015-12-31) for Windows:

Link Type Windows Description
Download .exe 32-bit x86 7-Zip for 32-bit Windows
Download .exe 64-bit x64 7-Zip for 64-bit Windows x64 (Intel 64 or AMD64)
Download .7z x86 / x64 7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager
Download .7z Any 7-Zip Source code
Download .7z Any / x86 / x64 LZMA SDK: (C, C++, C#, Java)
Download .msi 32-bit x86 (alternative MSI installer) 7-Zip for 32-bit Windows
Download .msi 64-bit x64 (alternative MSI installer) 7-Zip for 64-bit Windows x64 (Intel 64 or AMD64)

You find the download links for 7-zip above.

When you have downloaded and installed 7-zip, you can run the attached sample.

We have "hard coded" the path to 7-zip so if you have installed it a different location than C:\Program Files (x86)\7-zip\ then amend the code in the sample. (We downloaded the x86 version on x64, if you download the x86 version on x86 it will simply be C:\Program Files\7-Zip\ and the same if you download the x64 version on x64).

7-zip will create sub-directories etc if they don't exist so use sub-directories as much as you like.

We generate the file name from data and time, but you can generate them as you please.

We use the switch -ssw which means that it will archive files that are opened shared which is what files in an active DataEase application are opened as. This way we will be able to backup the application when it is still being used which will make it much easier and flexible.

On the button we simply execute the command line generated in BackupProgram field.

ExecuteFile() was improved earlier in 8.5 and will now accept complex command lines....very convenient now ;-)

Good luck.


Written by DataEase 05/03/16 at 17:54:49 Dataease [{8}]FIVE
DG3_ForumList