Hello,
I have a problem when I want to use MariaBackup for getting a partial
tables backup of a given database (actually willing to import them in
another database right after in the same system after the copy, but this
part doesn't seem to be relevant in this problem).
For doing this, I proceed the following way:
Suppose I have a database named “mydatabase” with some tables named
“mytable1”, “mytable2”, “mytable3”, “mytable4”, etc., that I want to
backup in a Linux folder like “/tmp/mydatabase/backup/”.
But I only want to backup tables named “mytable3”, “mytable4” and
“mytable5”.
So I create a file named, for example, “/tmp/mydatabase-table-list.txt”,
containing:
mydatabase.mytable3
mydatabase.mytable4
mydatabase.mytable5
… and I issue the following command in a Linux bash shell, as told in
the MariaBackup's documentation:
mariabackup -u root --backup --target-dir=/tmp/mydatabase/backup/
--databases=mydatabase --tables-file=/tmp/mydatabase-table-list.txt
At first, this seems to work, but actually, if I read the backup
directory's contents after the backup, I see that _the whole database
has been exported_, apparently _completely ignoring_ the
“/tmp/mydatabase-table-list.txt” file's contents.
But I can verify that this file is nevertheless read:
If I put only this in the “/tmp/mydatabase-table-list.txt” file:
mytable3
mytable4
mytable5
… I get an error message saying that the table names in the list must be
qualified with database names (expected to be the same as in the
--databases parameter, I suppose). Of course this doesn't work, but at
least, this proves that the table list file is actually read.
I also tried some other ways to specify the options, like removing the
--databases=mydatabase parameter, but in this case I get no database
contents, only the surrounding common files …
… or writing the command like this, as the documentation seemed to allow it:
mariabackup -u root --backup --target-dir=/tmp/mydatabase/backup/
--databases="mydatabase.mytable3 mydatabase.mytable4 mydatabase.mytable5"
… with same result as above: no database contents.
(by the way, my actual table names are not consistent between them like
above, so I can't use any regex or wildcard parameter)
My actual database is huge (more than 70 GB of files footprints), so it
is really annoying to have to backup it as a whole.
The database's size doesn't seem to be relevant: I also tested this with
a smaller one with same results.
What am I doing wrong in my “mariabackup” parameters?
For information, the version that I use is “mariabackup based on MariaDB
server 10.11.11-MariaDB debian-linux-gnu (x86_64)” (this is the result
of the “mariabackup -v” command), and this is the one currently
distributed as Debian packages with the “Debian GNU/Linux 12 (bookworm)”
that I maintain in several servers and Linux boxes, matching the
corresponding client and server versions installed on these systems.
Gingko
_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]