Page 3 of 3

Re: XAMPP Auto Backup

PostPosted: 01. February 2023 10:24
by Altrea
Yes, phpmyadmin add some meta information.
Also the structure is different. exporting a database consistent by an php application like phpmyadmin is a completely different approach, because you have to deal with different character sets, timeouts and ressource limits.

Re: XAMPP Auto Backup

PostPosted: 02. February 2023 02:22
by xiro911
Altrea wrote:Yes, phpmyadmin add some meta information.
Also the structure is different. exporting a database consistent by an php application like phpmyadmin is a completely different approach, because you have to deal with different character sets, timeouts and ressource limits.


I see but would that be the same or it is much better to use the manual backup instead of the automatic backup? The same I mean are all the necessary files needed for automatic backup are intact?

Re: XAMPP Auto Backup

PostPosted: 02. February 2023 07:23
by Altrea
xiro911 wrote:would that be the same or it is much better to use the manual backup instead of the automatic backup?

in most cases i would prefer the automatic backup, because you don't need to remember to take one.
Additionally mysqldump is a part of MariaDB and not a third party application like phpmyadmin. native scripts and programs are often more stable.

But in some cases it might be good to take a phpmyadmin export as well, especially if you plan to import it with phpmyadmin (for example on a shared webhost where you don't have the possibility to import database dump by script).

xiro911 wrote:are all the necessary files needed for automatic backup are intact?

What does that mean?

Re: XAMPP Auto Backup

PostPosted: 02. February 2023 08:01
by xiro911
Altrea wrote:
xiro911 wrote:would that be the same or it is much better to use the manual backup instead of the automatic backup?

in most cases i would prefer the automatic backup, because you don't need to remember to take one.
Additionally mysqldump is a part of MariaDB and not a third party application like phpmyadmin. native scripts and programs are often more stable.

But in some cases it might be good to take a phpmyadmin export as well, especially if you plan to import it with phpmyadmin (for example on a shared webhost where you don't have the possibility to import database dump by script).

xiro911 wrote:are all the necessary files needed for automatic backup are intact?

What does that mean?


What I am trying to say is in automatic backup no file/s is left behind. But with your explanation probably I will prefer to do both automatic and manual backup on interval schedule to keep the files integrity ;)

Re: XAMPP Auto Backup

PostPosted: 02. February 2023 12:39
by Nobbie
You are using two different tools for backup. That is your problem. Mysqldump is a completely different tool than phpmyadmin. You dont need phpmyadmin at all. You should use only mysqldump. That has nothing to do with automatic vs. manual backup. You should use mysqldump for automatic backup (i.e triggered by a scheduler) as well as for manual backup (triggered by user interaction i.e. keyboard).

The different files result from different backup options. Phpmyadmin comes with completely different backup options than mysqldump. And actually, none of them are real backups. Both tools are doing exports, not backups. Thats not the same. But you can use exports in order to have kind of backup. A real backup would be a copy of the data folder. That is a binary backup. You should keep binary backups also in any case.

It is on you decide, what you need. Do you need exports of tables and databases, or do you need full binary backup? You CANNOT have a binary backup of your tables and single databases. Thats technically impossible. You can only have an export of your data. You should edit one of your backup files (i.e export files) to get an understanding of what is happening there.

Re: XAMPP Auto Backup

PostPosted: 03. February 2023 08:51
by xiro911
Nobbie wrote:You are using two different tools for backup. That is your problem. Mysqldump is a completely different tool than phpmyadmin. You dont need phpmyadmin at all. You should use only mysqldump. That has nothing to do with automatic vs. manual backup. You should use mysqldump for automatic backup (i.e triggered by a scheduler) as well as for manual backup (triggered by user interaction i.e. keyboard).

The different files result from different backup options. Phpmyadmin comes with completely different backup options than mysqldump. And actually, none of them are real backups. Both tools are doing exports, not backups. Thats not the same. But you can use exports in order to have kind of backup. A real backup would be a copy of the data folder. That is a binary backup. You should keep binary backups also in any case.

It is on you decide, what you need. Do you need exports of tables and databases, or do you need full binary backup? You CANNOT have a binary backup of your tables and single databases. Thats technically impossible. You can only have an export of your data. You should edit one of your backup files (i.e export files) to get an understanding of what is happening there.


Thnank you so much pal :)

Re: XAMPP Auto Backup

PostPosted: 10. February 2023 01:59
by danielgblack
Nobbie wrote:
xiro911 wrote:It is so sad to hear this so we could not automate our XAMPP backup :(


.. Either simply copy the data folder,


Don't do this. A backup needs a consistent snapshot. As MariaDB writes to multiple files and relies on the syncronized state between them, copying files has no knowledge of these relations and will potentially leave you with a corrupted backup.

maria-backup or mariadb-dump per documentation (https://mariadb.com/kb/en/backup-and-restore-overview/).

Its only a backup if it can be restored. Check your restore procedure before you absolutely need it.

Re: XAMPP Auto Backup

PostPosted: 11. February 2023 14:54
by Froosh
Assuming MySQL/MariaDB is not running, copying the mysql/data folder and sub-folders is a complete backup of the state of the database at a given time. You should ensure that MySQL/MariaDB is not running when simply copying the files.

Restoring the data folder from a copy would restore all databases to the exactly state they were in when the backup was made. Using a command line tool, like mysqldump, could provide a more finely grained approach that could then be imported as needed. The export file is essentially a consolidation of the database into an archive.

I've used both approaches.

Re: XAMPP Auto Backup

PostPosted: 11. February 2023 16:52
by Nobbie
danielgblack wrote:A backup needs a consistent snapshot. As MariaDB writes to multiple files and relies on the syncronized state between them, copying files has no knowledge of these relations and will potentially leave you with a corrupted backup.


Sorry, but thats plain nonsense. If "data" folder is the configured folder for MySQL / MariaDB as datafolder, this folder of course holds ALL data and ALL relations. That is the concept of the data folder. Its the original data used at runtiime.

Froosh wrote:Assuming MySQL/MariaDB is not running, copying the mysql/data folder and sub-folders is a complete backup of the state of the database at a given time.


Exactly. Of course you MUST NOT copy the data folder while running the server, but this of course *should* be known.

Re: XAMPP Auto Backup

PostPosted: 13. February 2023 01:32
by xiro911
Thank all for your help all of you are so much help. More power to you guys and thank you again