Timeline for Considering that we don't want logs, what files should I put into my MariaDB's file-based backup plan?
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 30, 2023 at 13:10 | vote | accept | Saeed Neamati | ||
Jun 6, 2023 at 23:31 | answer | added | danblack | timeline score: 1 | |
Jun 2, 2023 at 17:34 | comment | added | J.D. | @SaeedNeamati "And if in theory all of the data is in those database files, and they are not dependent upon anything else, then why not?" - To mustaccio's point, an operation may be actively running, and even updates the state of one file but not the other dependent files, during the same time you take a file-based backup, leaving you with an inconsistent set of the files in the backup. | |
Jun 2, 2023 at 13:40 | comment | added | Saeed Neamati | @mustaccio, that's why I asked here. I know SQL Server does not allow direct access to files even for copy while it's using those files. But MariaDB on Linux does. And if in theory all of the data is in those database files, and they are not dependent upon anything else, then why not? | |
Jun 2, 2023 at 13:32 | comment | added | mustaccio | In general, it is not a good idea to use file-based backup for databases, MySQL or not. It only works reliably if 1) you have a full snapshot of the data directory and 2) you suspend all database updates while the backup is being taken. I suggest you use the database backup tools for your DBMS. | |
Jun 2, 2023 at 13:18 | history | edited | Saeed Neamati | CC BY-SA 4.0 |
added 402 characters in body
|
Jun 2, 2023 at 12:00 | comment | added | J.D. |
@SaeedNeamati I know the Simple Recovery Model in SQL Server. Even then the Log file is still used, it's just truncated more frequently, which prevents it from growing as quickly. And a Full backup restore in SQL Server still restores that Log file (at whatever size it was when the Full backup was taken). I'm not sure if a similar Recovery Model feature exists in MariaDB, but if it does, I'm sure you'll still need to retain your ib_logfile0 . I'm not sure how Log truncation works in MariaDB, but maybe your Log file isn't truncating properly, considering the size of it vs your # of rows.
|
|
Jun 2, 2023 at 6:03 | comment | added | Saeed Neamati |
@J.D. I'm not OK with data corruption. I just don't want logs and time-based snapshots. I only want to be able to restore the latest data that follows ACID. In SQL Server, there was a logging configuration that would allow developers to use Simple model. I want something similar for MariaDB.
|
|
Jun 2, 2023 at 6:02 | comment | added | Saeed Neamati | @RickJames, do you mean for a simple database MariaDB store 76 MBs of data? That seems extremely inefficient. | |
Jun 1, 2023 at 17:44 | comment | added | Rick James |
Do not lose ibdata1 -- that's where all your data is.
|
|
Jun 1, 2023 at 12:09 | comment | added | J.D. |
The ib_logfile0 is used during crash recovery to ensure data integrity. Without it, you're saying you're ok with potential data loss / corruption?
|
|
Jun 1, 2023 at 7:32 | history | asked | Saeed Neamati | CC BY-SA 4.0 |