Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Letzter Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
David Egan, Fabrice Harari

[WD17] HFBackup etc

Startbeitrag von David Egan am 02.08.2013 00:39

Hi
We have a client running an old non-Windev version of our software across several locations, all running independently, which we now want to move to Windev & HFCS. Currently they backup to a flash drive each day & once a week the Friday backup for each location is taken to Head Office where they copy it & can then run the app there for each location & do whatever they need to do. For their own reasons they want to maintain this method of operation with the new software.

My initial thought was to simply run a backup at each location via HBackup & then restore that at Head Office (under a new name if necessary). This requires the source database to be named, but unless I'm mistaken there seems to be no way to get this from the data on the flash drive. HBackupInfo gets its detail from the server where the backup was performed which is kinda useless (even for a normal backup/restore I would have thought).

In this particular case I can probably get away with allocating a single database name to each location but, in general we prefer to let the users set all this up as they can have multiple databases at a single location. I'd prefer to make a generic solution if possible so would be interested if anyone has any better solutions.

Cheers

David

Antworten:

Hi David

there are several ways to identify the DB being in the backup...

1. When doing the backup, your code KNOWs the DB being backuped, and can write it in an ini file on the flash drive (or directly on a dropbox directory that can be read at headquarters, but that is just my two cents)

2. If your users can define several DB at each location, they will have a process in your software to do so and give it a name... This name can be written INSIDE the DB, in a parameter record. This means that at this point, when you are doing a backup, you are also backuping its name, and can read it on the other side

3. You can also, of course, when doing the backup, do it in a directory NAMED after the original DB, and just reading the path on the drive will tell you what's what

Hope this helps

von Fabrice Harari - am 02.08.2013 01:21
Thanks Fabrice
Couldn't see the wood for the trees! They would all work nicely I think.

Just looking at the backup created, it includes a backup.info file which is really just an ini file by the looks of it. That already has a "Source" entry in it so that will do me.

Cheers

David

von David Egan - am 02.08.2013 01:47
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.