← Back to team overview

maria-discuss team mailing list archive

Re: Problems copy database files

 

I’ve been doing a bit more investigation and it looks like the FLUSH TABLES FOR EXPORT isn’t flushing to disk.

I monitor the modified time of the .MAD file for a table. If I make a change to the table the modified date doesn’t change. If I do FLUSH TABLES FOR EXPORT the modified time still doesn’t change. If I do a FLUSH TABLES the modified time does change. So adding the FOR EXPORT option seems to stop the data being flushed to disk.

Is this expected behaviour? It certainly isn’t how I read the documentation.

Regards

Andy Ling

From: Ling, Andy
Sent: Wed 06 May 2020 12:12
To: 'Roberto Spadim' <roberto@xxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] Re: Re: [Maria-discuss] Problems copy database files

As I said, there is no destination server in this simple test. It is all done within the same machine and the same instance of MariaDB server.

In the full system where I first noticed the problem the copied files are checked with the aria_chk command and the mysqlcheck command and apart from the “zero filling” message are OK. Still the data is missing.

It looks like the FLUSH command isn’t flushing all the way to disk.

Regards

Andy Ling


From: Roberto Spadim [mailto:roberto@xxxxxxxxxxxxx]
Sent: Wed 06 May 2020 12:06
To: Ling, Andy <Andy.Ling@xxxxxxxxxxxxxxx<mailto:Andy.Ling@xxxxxxxxxxxxxxx>>
Subject: [EXTERNAL] Re: Re: [Maria-discuss] Problems copy database files

there's an aria journaling file too, maybe it's not being sync before you copy, but from what i remember this should work, try to flush table at destination server and open table again just to check if it's not something at destination server

Em qua., 6 de mai. de 2020 às 07:59, Ling, Andy <Andy.Ling@xxxxxxxxxxxxxxx<mailto:Andy.Ling@xxxxxxxxxxxxxxx>> escreveu:
They are the same. I’m actually doing this simple test on a single machine (and disk). So the files are just being copied from the original database folder to a backup folder on the same disk drive.

Regards

Andy Ling


From: Roberto Spadim [mailto:roberto@xxxxxxxxxxxxx<mailto:roberto@xxxxxxxxxxxxx>]
Sent: Wed 06 May 2020 11:55
To: Ling, Andy <Andy.Ling@xxxxxxxxxxxxxxx<mailto:Andy.Ling@xxxxxxxxxxxxxxx>>
Cc: Mailing-List mariadb <maria-discuss@xxxxxxxxxxxxxxxxxxx<mailto:maria-discuss@xxxxxxxxxxxxxxxxxxx>>
Subject: [EXTERNAL] Re: [Maria-discuss] Problems copy database files

what about file size on both servers?

Em qua., 6 de mai. de 2020 às 07:35, Ling, Andy <Andy.Ling@xxxxxxxxxxxxxxx<mailto:Andy.Ling@xxxxxxxxxxxxxxx>> escreveu:
Hi,

I am having problems copying database files.

I am using MariaDB 10.4.12 on Windows server 2019. And all the tables use the Aria engine

A simple set of operations that reproduces the problem is…

Add some data to a table
FLUSH TABLE “table” FOR EXPORT
Copy the .FRM, .MAI, .MAD files for the table to a backup folder.
UNLOCK TABLES
switch to the database in the backup folder and check the contents of the copied table. I doesn’t contain the data just added. So it looks like the data is not being flushed to disk. The documentation suggests this should work, so are there some settings I need to change to make sure the data is flushed before I do the file copies.

Thanks for any help

Andy Ling

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss<https://urldefense.proofpoint.com/v2/url?u=https-3A__launchpad.net_-7Emaria-2Ddiscuss&d=DwMFaQ&c=Bg5XULDZR8GiOSSWNlpkCsRePnGDkKcI6oYL9xv1MnQ&r=Eslcxlfb11klFuj28W1xHcQ4MosILWCI33P-f2UzjnA&m=1s1raOoQ0ktYabDjw3998RKTh0aaBOOT0t8Z2KT7AJo&s=_5xZYrUL1xkVOJB6QbavrA97j6IO8wSU_8vWX0ukwzM&e=>
Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx<mailto:maria-discuss@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~maria-discuss<https://urldefense.proofpoint.com/v2/url?u=https-3A__launchpad.net_-7Emaria-2Ddiscuss&d=DwMFaQ&c=Bg5XULDZR8GiOSSWNlpkCsRePnGDkKcI6oYL9xv1MnQ&r=Eslcxlfb11klFuj28W1xHcQ4MosILWCI33P-f2UzjnA&m=1s1raOoQ0ktYabDjw3998RKTh0aaBOOT0t8Z2KT7AJo&s=_5xZYrUL1xkVOJB6QbavrA97j6IO8wSU_8vWX0ukwzM&e=>
More help   : https://help.launchpad.net/ListHelp<https://urldefense.proofpoint.com/v2/url?u=https-3A__help.launchpad.net_ListHelp&d=DwMFaQ&c=Bg5XULDZR8GiOSSWNlpkCsRePnGDkKcI6oYL9xv1MnQ&r=Eslcxlfb11klFuj28W1xHcQ4MosILWCI33P-f2UzjnA&m=1s1raOoQ0ktYabDjw3998RKTh0aaBOOT0t8Z2KT7AJo&s=dOrrn10QORq-s-SHSkSUzz1fmrZVPOktsuHlL0n1C4E&e=>


--
Roberto Spadim
SPAEmpresarial - Software ERP/Scada
Eng. Automação e Controle, Eng. Financeira
________________________________
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.


--
Roberto Spadim
SPAEmpresarial - Software ERP/Scada
Eng. Automação e Controle, Eng. Financeira

**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.

References