XAMPP Auto Backup

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: XAMPP Auto Backup

Postby Altrea » 01. February 2023 10:24

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: XAMPP Auto Backup

Postby xiro911 » 02. February 2023 02:22

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?
xiro911
 
Posts: 21
Joined: 24. January 2023 02:58
XAMPP version: 5.6.36
Operating System: Windows Server 2019

Re: XAMPP Auto Backup

Postby Altrea » 02. February 2023 07:23

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?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: XAMPP Auto Backup

Postby xiro911 » 02. February 2023 08:01

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 ;)
xiro911
 
Posts: 21
Joined: 24. January 2023 02:58
XAMPP version: 5.6.36
Operating System: Windows Server 2019

Re: XAMPP Auto Backup

Postby Nobbie » 02. February 2023 12:39

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.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: XAMPP Auto Backup

Postby xiro911 » 03. February 2023 08:51

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 :)
xiro911
 
Posts: 21
Joined: 24. January 2023 02:58
XAMPP version: 5.6.36
Operating System: Windows Server 2019

Re: XAMPP Auto Backup

Postby danielgblack » 10. February 2023 01:59

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.
danielgblack
 
Posts: 2
Joined: 10. February 2023 01:38
XAMPP version: 8.2.0
Operating System: Linux

Re: XAMPP Auto Backup

Postby Froosh » 11. February 2023 14:54

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.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro

Re: XAMPP Auto Backup

Postby Nobbie » 11. February 2023 16:52

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.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: XAMPP Auto Backup

Postby xiro911 » 13. February 2023 01:32

Thank all for your help all of you are so much help. More power to you guys and thank you again
xiro911
 
Posts: 21
Joined: 24. January 2023 02:58
XAMPP version: 5.6.36
Operating System: Windows Server 2019

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 94 guests