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

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

Postby nageswaragunupudi » Tue Mar 07, 2017 6: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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby devtuxtla » Wed Mar 08, 2017 10:33 pm

Hi Nages.

Ok via e-mail

Regards.
Visite Chiapas, el paraiso de México.
devtuxtla
 
Posts: 392
Joined: Tue Jul 29, 2008 1:55 pm

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

Postby nageswaragunupudi » Tue Mar 14, 2017 1:45 pm

Silent Automatic Daily Backups Example:

Code: Select all  Expand view

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

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

Postby MGA » Tue Mar 14, 2017 2:29 pm

Fantastic Mr Nages :D
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

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

Postby Maurizio » Wed Aug 22, 2018 8: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
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

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

Postby Busmatic_wpb » Mon Sep 17, 2018 1: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
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)

Postby nageswaragunupudi » Mon Sep 17, 2018 2:16 pm

No.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby MOISES » Sun Jun 07, 2020 4: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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

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

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

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

Postby MOISES » Mon Jun 08, 2020 6: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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

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

Postby nageswaragunupudi » Mon Jun 08, 2020 7: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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby MOISES » Mon Jun 08, 2020 8: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
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

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

Postby nageswaragunupudi » Sat Jun 20, 2020 4: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
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

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

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

Postby nageswaragunupudi » Sat Jun 20, 2020 12:28 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests