FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

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
devtuxtla
Posts: 392
Joined: Tue Jul 29, 2008 1:55 pm

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by devtuxtla »

Hi Nages.

Ok via e-mail

Regards.
Visite Chiapas, el paraiso de México.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

Silent Automatic Daily Backups Example:

Code: Select all

#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
MGA
Posts: 1219
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by MGA »

Fantastic Mr Nages :D
ubiratanmga@gmail.com

FWH17.04
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
User avatar
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by Maurizio »

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
User avatar
Busmatic_wpb
Posts: 162
Joined: Wed Feb 22, 2017 2:19 am

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by Busmatic_wpb »

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
_@Situcr.com
Desarrollos BA4/B4j androide
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

No.
Regards

G. N. Rao.
Hyderabad, India
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by MOISES »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by MOISES »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by MOISES »

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
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

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
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by MOISES »

Thank you very much!

Will support Access too?
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 16.06: MariaDb/MySql Backup and Restore (Updated 16.08)

Post by nageswaragunupudi »

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

G. N. Rao.
Hyderabad, India
Post Reply