FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Tue Mar 07, 2017 06:10 PM
devtuxtla wrote:Thanks...

Any idea for a quick implementation?

Regards

We could not make this feature ready in FWH 17.02.
If you like to help by testing this new feature, we would be glad to send revised libs to you by email for your testing and feedback.

If interested, please send email to me
nageswaragunupudi [at] gmail [dot] com
Regards



G. N. Rao.

Hyderabad, India
Posts: 392
Joined: Tue Jul 29, 2008 01:55 PM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Wed Mar 08, 2017 10:33 PM

Hi Nages.

Ok via e-mail

Regards.

Visite Chiapas, el paraiso de México.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Tue Mar 14, 2017 01:45 PM
Silent Automatic Daily Backups Example:

Code (fw): Select all Collapse
#include "fivewin.ch"

function Main()

   local oCn

   oCn := mysql_Connect( "localhost", "fwh", "gnrao", "secret" ) // DB selected is FWH
   oCn:BackUp( NIL, "c:\mysqlbackups\" )

return nil


Build this exe in c:\fwh\samples folder.

Now use Windows TaskSheduler to run this program every night at 03:00 AM silently using SYSTEM user account.

Every morning this program creates a new folder with the weekday name and creates a backup in that folder. Exampple
c:\mysqlbackups\monday\fwh.sql
c:\mysqlbackups\tuesday\fwh.sql
etc.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Tue Mar 14, 2017 02:29 PM

Fantastic Mr Nages :D

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Wed Aug 22, 2018 08:45 AM

Hello Ms. Nages

I use MariaDB/MySql Backup with great satisfaction :D .

Now I have two SQL Server databases. One is client and the second is on the server .
I use MariaDB/MySql Backup for the backup on the server , and MariaDB/MySql Restore on the client.

I saw that with mysqldump you can do it in one operation :
mysqldump --host=127.0.0.1 --port=3306 -uxxx -px mastronipe arti | mysql --host=192.168.0.254 --port=3306 -uxxxx -pxxxx mastropalmare

can you do the same with MariaDB/MySql Backup ? or there is a better way to replicate 2 databases ?

Regards Maurizio

Posts: 162
Joined: Wed Feb 22, 2017 02:19 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Sep 17, 2018 01:45 PM

Hi I have a question..

Is there any way to insert new records and that the table or tables are not deleted when executing a restore?

Thanks

Regards.
S.I.T.U.
Sistemas Inteligentes de transporte urbano
http://www.situcr.com
oscarchacon@Situcr.com
Desarrollos BA4/B4j androide
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Sep 17, 2018 02:16 PM

No.

Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Sun Jun 07, 2020 04:12 PM

Hi,

I can´t get to work with ADO for MSSQL.

Thank you.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Jun 08, 2020 12:44 AM
MOISES wrote:Hi,

I can´t get to work with ADO for MSSQL.

Thank you.


This backup and restore feature is only for MySQL / MariaDB databases. Not for any other databases like MSSQL.
Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Jun 08, 2020 06:58 AM

As sources are not available, can you please adapt these functions for ADO too?

At least, the backup function.

Thank you.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Jun 08, 2020 07:31 AM

You can use the same backup/restore for any mysql/mariadb database whether your main application uses ADO or FWMariaLibs or any other libs like Dolphin,etc.

But this logic is not at all useful to any other database like MSSQL., Oracle, etc.

Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Mon Jun 08, 2020 08:11 AM

Hi,

What I mean is produce an output such as:

DROP TABLE IF EXISTS clientes;
CREATE TABLE clientes (
id_cliente int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (id_cliente)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO clientes VALUES (1,'Distribuidora Pepe'),(2,'Estacion de Servicio YPF'),(3,'Agropecuaria Venado');
-- {{"moises",0,645,FW_SToT("20200608100940337"),0.19000000,"TABLE"},{"clientes",645,391,FW_SToT("20200608100940567"),0.19100000,"TABLE"}}008B

This code can be executed in mostly RDBMS.

At least, the INSERT INTO for all values.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Sat Jun 20, 2020 04:50 AM
FWH 2006

* New functions for MSSQL in adofuncs.prg
FW_MSSQL_Backup( oCn, cDb, cFile ) --> lSuccess
FW_MSSQL_Restore( oCn, cDb, cFile ) --> lSuccess
Regards



G. N. Rao.

Hyderabad, India
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Sat Jun 20, 2020 10:59 AM

Thank you very much!

Will support Access too?

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)
Posted: Sat Jun 20, 2020 12:28 PM

Access?
Simply copy mdb/accdb file to a safe place.

Regards



G. N. Rao.

Hyderabad, India