Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
-
None
Description
# CREATE COMPLETELY NEW INSTANCE:
|
systemctl stop mariadb; rm -fr /var/lib/mysql/*; rm -fr /var/log/mysql/*
|
/usr/bin/mariadb-install-db 1>/dev/null 2>&1 && echo OK
|
chown -R mysql:mysql /var/lib/mysql; chown -R mysql:mysql /var/log/mysql
|
systemctl start mariadb && echo OK
|
|
mariadb -ABNe "select version();"
|
|
mariadb -Ae "DROP SCHEMA IF EXISTS TBK; CREATE SCHEMA TBK;CREATE TABLE TBK.bktiming (c1 int(11) NOT NULL AUTO_INCREMENT,c2 datetime DEFAULT current_timestamp(),c3 varchar(100) DEFAULT NULL,PRIMARY KEY (c1)) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;CREATE TABLE TBK.thousand_rows (c1 int(11) NOT NULL, c2_ipsum varchar(500) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;CREATE USER 'mariabackup'@'localhost' IDENTIFIED BY 'mypassword'; GRANT RELOAD, PROCESS, LOCK TABLES, BINLOG MONITOR ON *.* TO 'mariabackup'@'localhost';"
|
|
mariadb -Ae "insert into TBK.bktiming(c3) values ('before any backup');"
|
rm -fr /var/mariadb; mkdir -p /var/mariadb
|
mariabackup --backup --user=mariabackup --password=mypassword --target-dir=/var/mariadb/full 1>/dev/null 2>&1 && echo OK
|
mariadb -Ae "insert into TBK.bktiming(c3) values ('after full backup');"
|
cat /var/mariadb/full/xtrabackup_checkpoints
|
|
# ADD 1,000 rows to a table, do it 100 times
|
for ii in {1..100}; do mariadb TBK < thousand_rows.sql; done;
|
mariadb TBK -ABNe "select format(count(*),0) as row_count from thousand_rows;"
|
mariadb -Ae "select (DATA_LENGTH+INDEX_LENGTH+DATA_FREE)/1024/1024 AS thousand_rows_IN_MB from information_schema.tables where table_schema='TBK' and table_name='thousand_rows';"
|
|
mariadb -Ae "insert into TBK.bktiming(c3) values ('before incremental backup');"
|
mariabackup --backup --user=mariabackup --password=mypassword --incremental-basedir=/var/mariadb/full --target-dir=/var/mariadb/inc 1>/dev/null 2>&1 && echo OK
|
mariadb -Ae "insert into TBK.bktiming(c3) values ('after incremental backup');"
|
|
cat /var/mariadb/inc/xtrabackup_checkpoints
|
You will see that xtrabackup_checkpoints will look like this:
backup_type = incremental
|
from_lsn = 46574
|
to_lsn = 46574
|
last_lsn = 57945480
|
Which means it does not backup changes since previous full backup.
Tested on these two versions:
10.11.1-MariaDB-1:10.11.1+maria~deb11
10.6.12-7-MariaDB-enterprise-log