Page 1 of 2

Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 11:01 am
by Marc Venken
Hello,

I can not find the post that once was posted here with a complete backup program solution to implement in our code.
The samples dir also has no sample.

Anyone the link to a backup solution or a working sample code ?

Backup for files in a folder !! No ADO or SQL. Dbf and cdx ...

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 12:28 pm
by Otto
Marc,
If you only need the DBF file, I have found that it is safest to copy record by record.

In your case, however, you should install WINDOWS SERVER and use the built-in BACKUP.



http://forums.fivetechsupport.com/viewtopic.php?f=3&t=37383&p=223340&hilit=Backup&sid=4f509b4564cf66520f9ed6daf91803a6&sid=ee7d56e42a4c4b1e4462cdb0d2a3f707#p223340

Best regards,
Otto

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 1:08 pm
by karinha

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 6:34 pm
by Marc Venken
I use Goodsync for my external backups.

I think that I will use FW filecopy to copy the desired files to a backup location. If the Link should be found... Please let me know. I thought it was from mr. Rao

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 6:50 pm
by Otto
Marco,
Have you ever had contact with Ransomware?
Best regards,
Otto

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 7:16 pm
by Marc Venken
Otto wrote:Marco,
Have you ever had contact with Ransomware?
Best regards,
Otto


Nope... And I hope to keep it so :) :)

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 7:17 pm
by Marc Venken
Otto,

Did you see my FB message about the server system ?

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 7:51 pm
by Otto
Marc,
Please let me know how far you are with the RDP installation and the WINDOWS server installation.
Best regards,
Otto

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 8:51 pm
by Jimmy
hi,

i have written App under Xbase++ and HMG with Source which you can find here
https://www.hmgforum.com/viewtopic.php?t=7022

Image

i use Attribut "A", like XCOPY, for increment Backup and reset Attribut.

---

i use ShfileOperation()*** API, like Explorer, with "active" Progressbar.
have a look into HMG Source how to enable it and try if Code work with Fivewin

*** Sample c:\fwh\samples\dlgfile.prg does not include any Parameter

Re: Backup from inside FWH program

PostPosted: Wed Aug 31, 2022 9:44 pm
by TimStone
Are you asking about a backup system for the users of your application ? If so, I built an external program that runs as a service. It has 4 main functions:

1). It updates the license key ( useful for upgrades and SAAS installations )
2). It submits data to 3rd party vendors used by my customer
3). It installs program updates
4). It performs a daily backup

These functions are performed shortly after midnight on a new day. This is when the client is least likely to be working.

The backup creates an archive of the entire data folder. It writes it to a default folder in the program directory, or the customer can set it to write to an external drive or location. So, if it is set to write to the One Drive folder on that machine, the computer will then write it to the cloud. The file name includes the date, so each zip file is unique, and the customer can have a series of them. I also provide the option for it to submit it daily to my cloud server.

As for ransomware, go luck to the perpetrator. If my client gets attacked, I have them do a complete reformat of the system ( and any attached computers ). I can then reinstall the software remotely in a matter of minutes, and restore from the latest backup. Annoying to their business, sure. But the thieves don't get any money, and my client is wiser on how they will take precautions in the future.

As for my system, I use Goodsync on my programming machine, writing to a portable drive, and to the cloud. I also regularly have redundant copies on two other computers.

Re: Backup from inside FWH program

PostPosted: Thu Sep 01, 2022 7:29 am
by Marc Venken
It is so that some day's ago I had the bad luck changing some code and the data was changed the wrong way (full database) The backup runs dayly, but I was changing code and did a run on the live data. (Never do this Marc !!! :wink: )

For my program, I made a change in the link files that every time I link (change) there is a older copy with datestamp, so that is covered.
I thing that I do something like it for the data files.

Re: Backup from inside FWH program

PostPosted: Thu Sep 01, 2022 7:59 am
by Marc Venken
I think of doing this : (Not for Users, only me as programmer)

Create a function that can be called with a function key that let me select the databases to use (depending on code that will be changed)

In the code where i'm working before executing the changing loops, call the backup routine making datetime stamp copy's of the data. That way I will have the latest version at hand if I do the code wrong..

Seems ok not ?

Re: Backup from inside FWH program

PostPosted: Thu Sep 01, 2022 10:03 am
by Otto
Marc,
You should install a Synology.

You can set how many backups you want to make per day and how long the backups are kept.

With a simple client, you can completely backup every PC to this station.


Best regards,
Otto



Image

Re: Backup from inside FWH program

PostPosted: Thu Sep 01, 2022 10:26 am
by Marc Venken
Otto,

For my general backup I use synogoly backup .and. Goodsync. The synology will power up, make the full backup and shut down. A System that is not powered can not be affected with ransomware. (I Hope So)

This Topic backup/copy is ment to be used for programming tool (see above)

Re: Backup from inside FWH program

PostPosted: Thu Sep 01, 2022 10:27 am
by Marc Venken
Otto wrote:Marc,
Please let me know how far you are with the RDP installation and the WINDOWS server installation.
Best regards,
Otto


I was waiting .....