FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Auto-backup -timer question.
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Auto-backup -timer question.
Posted: Tue Apr 23, 2019 06:02 AM
Hi,

According to the problem I had with
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=37039

I have create a little program to make a SQL-backup.
I want to do a backup every hour. Each time he create another file-name, so there is no overwrite. Now I keep 30 versions of a backup
Now is my question, what is the best.
Calling each time the program with Window Schedule, or start the program, and create a backup each hour with timer in FW?
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Auto-backup -timer question.
Posted: Tue Apr 23, 2019 10:30 AM

Hello Marc,
are you using an inhouse server or is the SQL database hosted somewhere.
Best regards
Otto

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Auto-backup -timer question.
Posted: Tue Apr 23, 2019 10:52 AM

Otto,

I use it on a NAS with MariaDB of a customer that had the Hack-problem.
Now I installed the backup-program on a PC, and start the backup with Windows Schedule, that create it on the local harddisk.
It's working fine now :D

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Auto-backup -timer question.
Posted: Tue Apr 23, 2019 12:39 PM
In my opinion, Windows Schedule is better.

For backup, FWH has its own built-in backup and restore methods, which are quite fast.
Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oCn
   
   oCn := maria_Connect( <server>, <db>, <user>, <pw> )
   oCn:BackUp( [<db>], <cDstFile> )
   oCn:Close()
   
return nil
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion