This is a command-line option for the
mariabackup commands (arg: Required).
The value is used in place of innodb_
--use-memory option can be specified on the command-line when the
--prepare option is specified:
$ sudo mariadb-backup --prepare \ --use-memory=32G \ --target-dir=/data/backups/full
--use-memory option configures the amount of memory that
mariabackup can allocate to prepare a backup, which occurs when the
--prepare option is specified. The default value is
104857600 (100 MiB).
While preparing the backup,
mariabackup use the allocated memory in the same way that InnoDB uses the InnoDB Buffer Pool during crash recovery. Therefore, for best performance, the value of the
--use-memory option should be greater than or equal to the
innodb_buffer_pool_size value from the server where the backup was created.
In MariaDB Enterprise Server 10.5 and later,
mariabackup use memory very efficiently when preparing a backup, so it can be safe to set the
--use-memory option to a smaller size than
innodb_buffer_pool_size, but setting it to
innodb_buffer_pool_size or larger can make the prepare finish sooner.
In MariaDB Enterprise Server 10.4 and before,
mariabackup can require more memory to prepare a backup than InnoDB requires for crash recovery, so the
--use-memory option might sometimes need to be set to a higher value than the server's
MariaDB recommends testing a
--use-memory value in your own environment to confirm that it provides acceptable performance.
When a backup is prepared on a running database server, a high
--use-memory value can impact performance of the database. Therefore, MariaDB recommends preparing backups on a different system to avoid impacting the database server.