[MDEV-15075]  mariabackup with specified --host option does not backup data from remote MariaDB Server Created: 2018-01-25  Updated: 2023-11-14

Status: Open
Project: MariaDB Server
Component/s: Backup, Documentation
Affects Version/s: 10.2.12
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Zdravelina Sokolovska (Inactive) Assignee: Ian Gilfillan
Resolution: Unresolved Votes: 4
Labels: upstream
Environment:

CentOS 7.4



 Description   

mariabackup with specified --host option does not backup data from remote MariaDB Server

expected :
backup data from remote MariaDB Server via mariabackup --host option

how to repeat :
1.backup data of remote MariaDB Server t4w6 using mariabackup --host option
2.check the content of the backup-ed data – although the backup started with message
"Connecting to MySQL server host: t4w6" , it's done local backup

note: the same occurs if specify the ip address of the remote MariaDB Server,
backup is starting with message " Connecting to MySQL server host: 192.168.104.196, user: root, passwor..." , but it's done local backup

1

[root@t4w3 mariadb]# mariabackup --host=t4w6 -u root --backup --history=ccc   --target-dir=/var/mariadb/backupRw6
180125 19:19:27 Connecting to MySQL server host: t4w6, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.12-MariaDB
mariabackup based on MariaDB server 10.2.12-MariaDB Linux (x86_64)
mariabackup: uses posix_fadvise().
mariabackup: cd to /var/lib/mysql/
mariabackup: open files limit requested 0, set to 1024
mariabackup: using the following InnoDB configuration:
mariabackup:   innodb_data_home_dir = .
mariabackup:   innodb_data_file_path = ibdata1:12M:autoextend
mariabackup:   innodb_log_group_home_dir = ./
2018-01-25 19:19:27 139836746336384 [Note] InnoDB: Number of pools: 1
mariabackup: Can't create/write to file '/var/mariadb/backupRw6/ib_logfile0' (Errcode: 17 "File exists")
mariabackup: error: failed to open the target stream for 'ib_logfile0'.
[root@t4w3 mariadb]# mariabackup --host=t4w6 -u root --backup --history=ccc   --target-dir=/var/mariadb/backupR4w6
180125 19:19:45 Connecting to MySQL server host: t4w6, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.12-MariaDB
mariabackup based on MariaDB server 10.2.12-MariaDB Linux (x86_64)
mariabackup: uses posix_fadvise().
mariabackup: cd to /var/lib/mysql/
mariabackup: open files limit requested 0, set to 1024
mariabackup: using the following InnoDB configuration:
mariabackup:   innodb_data_home_dir = .
mariabackup:   innodb_data_file_path = ibdata1:12M:autoextend
mariabackup:   innodb_log_group_home_dir = ./
2018-01-25 19:19:45 140481951557760 [Note] InnoDB: Number of pools: 1
180125 19:19:45 >> log scanned up to (1041449671)
mariabackup: Generating a list of tablespaces
2018-01-25 19:19:45 140481951557760 [Warning] InnoDB: Allocated tablespace ID 3 for mysql/gtid_slave_pos, old maximum was 0
180125 19:19:46 [01] Copying ./ibdata1 to /var/mariadb/backupR4w6/ibdata1
180125 19:19:46 >> log scanned up to (1041449671)
180125 19:19:48 [01]        ...done
180125 19:19:48 [01] Copying ./mysql/gtid_slave_pos.ibd to /var/mariadb/backupR4w6/mysql/gtid_slave_pos.ibd
180125 19:19:48 [01]        ...done
180125 19:19:48 [01] Copying ./mysql/innodb_index_stats.ibd to /var/mariadb/backupR4w6/mysql/innodb_index_stats.ibd
180125 19:19:48 [01]        ...done
180125 19:19:48 [01] Copying ./mysql/innodb_table_stats.ibd to /var/mariadb/backupR4w6/mysql/innodb_table_stats.ibd
180125 19:19:48 [01]        ...done
180125 19:19:48 [01] Copying ./boxoffice_mdb/dim_showtime.ibd to /var/mariadb/backupR4w6/boxoffice_mdb/dim_showtime.ibd
180125 19:19:50 [01]        ...done
180125 19:19:50 [01] Copying ./boxoffice_mdb/fact_tickets.ibd to /var/mariadb/backupR4w6/boxoffice_mdb/fact_tickets.ibd
180125 19:19:56 [01]        ...done
180125 19:19:56 [01] Copying ./PERCONA_SCHEMA/xtrabackup_history.ibd to /var/mariadb/backupR4w6/PERCONA_SCHEMA/xtrabackup_history.ibd
180125 19:19:56 [01]        ...done
180125 19:19:57 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
180125 19:19:57 Executing FLUSH TABLES WITH READ LOCK...
180125 19:19:57 Starting to backup non-InnoDB tables and files
180125 19:19:57 [01] Copying ./mysql/roles_mapping.MYI to /var/mariadb/backupR4w6/mysql/roles_mapping.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/column_stats.MYD to /var/mariadb/backupR4w6/mysql/column_stats.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/table_stats.MYI to /var/mariadb/backupR4w6/mysql/table_stats.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/column_stats.MYI to /var/mariadb/backupR4w6/mysql/column_stats.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/table_stats.frm to /var/mariadb/backupR4w6/mysql/table_stats.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/column_stats.frm to /var/mariadb/backupR4w6/mysql/column_stats.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/procs_priv.MYI to /var/mariadb/backupR4w6/mysql/procs_priv.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/func.MYD to /var/mariadb/backupR4w6/mysql/func.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/columns_priv.MYI to /var/mariadb/backupR4w6/mysql/columns_priv.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/func.frm to /var/mariadb/backupR4w6/mysql/func.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/db.frm to /var/mariadb/backupR4w6/mysql/db.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/event.frm to /var/mariadb/backupR4w6/mysql/event.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/host.MYD to /var/mariadb/backupR4w6/mysql/host.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/user.MYI to /var/mariadb/backupR4w6/mysql/user.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/procs_priv.frm to /var/mariadb/backupR4w6/mysql/procs_priv.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/user.MYD to /var/mariadb/backupR4w6/mysql/user.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone.MYD to /var/mariadb/backupR4w6/mysql/time_zone.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/general_log.CSM to /var/mariadb/backupR4w6/mysql/general_log.CSM
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone.MYI to /var/mariadb/backupR4w6/mysql/time_zone.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/general_log.CSV to /var/mariadb/backupR4w6/mysql/general_log.CSV
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone.frm to /var/mariadb/backupR4w6/mysql/time_zone.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/general_log.frm to /var/mariadb/backupR4w6/mysql/general_log.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_leap_second.MYD to /var/mariadb/backupR4w6/mysql/time_zone_leap_second.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/gtid_slave_pos.frm to /var/mariadb/backupR4w6/mysql/gtid_slave_pos.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_leap_second.MYI to /var/mariadb/backupR4w6/mysql/time_zone_leap_second.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_leap_second.frm to /var/mariadb/backupR4w6/mysql/time_zone_leap_second.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/help_category.MYD to /var/mariadb/backupR4w6/mysql/help_category.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_name.MYD to /var/mariadb/backupR4w6/mysql/time_zone_name.MYD
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/help_category.MYI to /var/mariadb/backupR4w6/mysql/help_category.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_name.MYI to /var/mariadb/backupR4w6/mysql/time_zone_name.MYI
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/help_category.frm to /var/mariadb/backupR4w6/mysql/help_category.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/time_zone_name.frm to /var/mariadb/backupR4w6/mysql/time_zone_name.frm
180125 19:19:57 [01]        ...done
180125 19:19:57 [01] Copying ./mysql/help_keyword.MYD to /var/mariadb/backupR4w6/mysql/help_keyword.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/time_zone_transition.MYD to /var/mariadb/backupR4w6/mysql/time_zone_transition.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_keyword.MYI to /var/mariadb/backupR4w6/mysql/help_keyword.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/time_zone_transition.MYI to /var/mariadb/backupR4w6/mysql/time_zone_transition.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_keyword.frm to /var/mariadb/backupR4w6/mysql/help_keyword.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/time_zone_transition.frm to /var/mariadb/backupR4w6/mysql/time_zone_transition.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_relation.MYD to /var/mariadb/backupR4w6/mysql/help_relation.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_relation.MYI to /var/mariadb/backupR4w6/mysql/help_relation.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_relation.frm to /var/mariadb/backupR4w6/mysql/help_relation.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_topic.MYD to /var/mariadb/backupR4w6/mysql/help_topic.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_topic.MYI to /var/mariadb/backupR4w6/mysql/help_topic.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/help_topic.frm to /var/mariadb/backupR4w6/mysql/help_topic.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/user.frm to /var/mariadb/backupR4w6/mysql/user.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/host.frm to /var/mariadb/backupR4w6/mysql/host.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/index_stats.MYD to /var/mariadb/backupR4w6/mysql/index_stats.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/index_stats.MYI to /var/mariadb/backupR4w6/mysql/index_stats.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/index_stats.frm to /var/mariadb/backupR4w6/mysql/index_stats.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/time_zone_transition_type.MYD to /var/mariadb/backupR4w6/mysql/time_zone_transition_type.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/innodb_index_stats.frm to /var/mariadb/backupR4w6/mysql/innodb_index_stats.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proxies_priv.MYI to /var/mariadb/backupR4w6/mysql/proxies_priv.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proxies_priv.frm to /var/mariadb/backupR4w6/mysql/proxies_priv.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/innodb_table_stats.frm to /var/mariadb/backupR4w6/mysql/innodb_table_stats.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/roles_mapping.MYD to /var/mariadb/backupR4w6/mysql/roles_mapping.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/plugin.MYI to /var/mariadb/backupR4w6/mysql/plugin.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proc.MYD to /var/mariadb/backupR4w6/mysql/proc.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proc.MYI to /var/mariadb/backupR4w6/mysql/proc.MYI
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proc.frm to /var/mariadb/backupR4w6/mysql/proc.frm
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/proxies_priv.MYD to /var/mariadb/backupR4w6/mysql/proxies_priv.MYD
180125 19:19:58 [01]        ...done
180125 19:19:58 [01] Copying ./mysql/roles_mapping.frm to /var/mariadb/backupR4w6/mysql/roles_mapping.frm
180125 19:19:58 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/servers.MYD to /var/mariadb/backupR4w6/mysql/servers.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/servers.MYI to /var/mariadb/backupR4w6/mysql/servers.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/servers.frm to /var/mariadb/backupR4w6/mysql/servers.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/slow_log.CSM to /var/mariadb/backupR4w6/mysql/slow_log.CSM
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/slow_log.CSV to /var/mariadb/backupR4w6/mysql/slow_log.CSV
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/slow_log.frm to /var/mariadb/backupR4w6/mysql/slow_log.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/table_stats.MYD to /var/mariadb/backupR4w6/mysql/table_stats.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/time_zone_transition_type.MYI to /var/mariadb/backupR4w6/mysql/time_zone_transition_type.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/time_zone_transition_type.frm to /var/mariadb/backupR4w6/mysql/time_zone_transition_type.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/tables_priv.MYD to /var/mariadb/backupR4w6/mysql/tables_priv.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/tables_priv.frm to /var/mariadb/backupR4w6/mysql/tables_priv.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/columns_priv.MYD to /var/mariadb/backupR4w6/mysql/columns_priv.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/plugin.MYD to /var/mariadb/backupR4w6/mysql/plugin.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/event.MYD to /var/mariadb/backupR4w6/mysql/event.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/host.MYI to /var/mariadb/backupR4w6/mysql/host.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/columns_priv.frm to /var/mariadb/backupR4w6/mysql/columns_priv.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/plugin.frm to /var/mariadb/backupR4w6/mysql/plugin.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/event.MYI to /var/mariadb/backupR4w6/mysql/event.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/tables_priv.MYI to /var/mariadb/backupR4w6/mysql/tables_priv.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/procs_priv.MYD to /var/mariadb/backupR4w6/mysql/procs_priv.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/db.MYI to /var/mariadb/backupR4w6/mysql/db.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/db.MYD to /var/mariadb/backupR4w6/mysql/db.MYD
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./mysql/func.MYI to /var/mariadb/backupR4w6/mysql/func.MYI
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./boxoffice_mdb/db.opt to /var/mariadb/backupR4w6/boxoffice_mdb/db.opt
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./boxoffice_mdb/dim_showtime.frm to /var/mariadb/backupR4w6/boxoffice_mdb/dim_showtime.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./boxoffice_mdb/fact_tickets.frm to /var/mariadb/backupR4w6/boxoffice_mdb/fact_tickets.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./test/db.opt to /var/mariadb/backupR4w6/test/db.opt
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./performance_schema/db.opt to /var/mariadb/backupR4w6/performance_schema/db.opt
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./PERCONA_SCHEMA/db.opt to /var/mariadb/backupR4w6/PERCONA_SCHEMA/db.opt
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying ./PERCONA_SCHEMA/xtrabackup_history.frm to /var/mariadb/backupR4w6/PERCONA_SCHEMA/xtrabackup_history.frm
180125 19:19:59 [01]        ...done
180125 19:19:59 Finished backing up non-InnoDB tables and files
180125 19:19:59 [01] Copying aria_log.00000001 to /var/mariadb/backupR4w6/aria_log.00000001
180125 19:19:59 [01]        ...done
180125 19:19:59 [01] Copying aria_log_control to /var/mariadb/backupR4w6/aria_log_control
180125 19:19:59 [01]        ...done
180125 19:19:59 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
mariabackup: The latest check point (for incremental): '1041449608'
mariabackup: Stopping log copying thread.
 
180125 19:19:59 >> log scanned up to (1041449671)
180125 19:19:59 Executing UNLOCK TABLES
180125 19:19:59 All tables unlocked
180125 19:19:59 [00] Copying ib_buffer_pool to /var/mariadb/backupR4w6/ib_buffer_pool
180125 19:19:59 [00]        ...done
180125 19:20:00 Backup created in directory '/var/mariadb/backupR4w6/'
180125 19:20:00 [00] Writing backup-my.cnf
180125 19:20:00 [00]        ...done
180125 19:20:00 [00] Writing xtrabackup_info
180125 19:20:00 [00]        ...done
mariabackup: Redo log (from LSN 1041449662 to 1041449671) was copied.
180125 19:20:00 completed OK!

[root@t4w3 mariadb]# ls /var/mariadb/backupR4w6
aria_log.00000001  backup-my.cnf  ib_buffer_pool  ib_logfile0  PERCONA_SCHEMA      test                    xtrabackup_info
aria_log_control   boxoffice_mdb  ibdata1         mysql        performance_schema  xtrabackup_checkpoints
 
[root@t4w3 mariadb]# ls /var/mariadb/backupR4w6/boxoffice_mdb/
db.opt  dim_showtime.frm  dim_showtime.ibd  fact_tickets.frm  fact_tickets.ibd

2 .check the content of the backuped data – although the backup started with message
"Connecting to MySQL server host: t4w6" , it's done local backup

2

[root@t4w3 mariadb]# ls /var/mariadb/backupR4w6/boxoffice_mdb/
db.opt  dim_showtime.frm  dim_showtime.ibd  fact_tickets.frm  fact_tickets.ibd

[root@t4w3 mariadb]# mysql -h t4w6 -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 339
Server version: 10.2.12-MariaDB MariaDB Server
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> show tables from boxoffice_mdb  ;
+-------------------------+
| Tables_in_boxoffice_mdb |
+-------------------------+
| dim_showtime            |
| dim_theater             |
| dim_theater_mdc         |
| dim_ticket_type         |
| dim_title               |
| fact_tickets            |
+-------------------------+
6 rows in set (0.00 sec)

note: the same occurs of specify the ip address of the MariaDB Server,
backup is starting with message " Connecting to MySQL server host: 192.168.104.196, user: root, passwor..." , but it's done local backup

mariabackup --host=192.168.104.196 -u root --backup --history=ccc   --target-dir=/var/mariadb/backupRt4w6
180125 19:21:26 Connecting to MySQL server host: 192.168.104.196, user: root, password: not set, port: not set, socket: not set
Using server version 10.2.12-MariaDB
mariabackup based on MariaDB server 10.2.12-MariaDB Linux (x86_64)
~~~~~~
[root@t4w3 mariadb]# ls /var/mariadb/backupRt4w6/boxoffice_mdb/
db.opt  dim_showtime.frm  dim_showtime.ibd  fact_tickets.frm  fact_tickets.ibd



 Comments   
Comment by Zdravelina Sokolovska (Inactive) [ 2018-01-25 ]

the same occurs of specify the ip address of the remote MariaDB Server instaed of domain name :
backup is starting with message " Connecting to MySQL server host: 192.168.104.196, user: root, passwor..." , but it's done local backup

Comment by Vladislav Vaintroub [ 2018-01-26 ]

mariabackup, just like its predecessor xtrabackup, was not designed to work on remote boxes.
It copies files physically, from datadirectory it reads from the server, to backup directory (or stream)
mariabackup still need to issue some SQL commands,(including reading Innodb's Information schema tables, "FLUSH TABLES WITH READ LOCK" etc), so it needs to connect to the server.

Now, there are couple of technicalities to consider

  • User identity in MariaDB is user name and IP address. Thus you might have to connect specifying IP addresses (in case you have several network interface cards, you can choose via which address you connect), or (one of) DNS names, or 127.0.0.1, or ::1 . You can also connect via unix domain socket, windows named pipe or even shared memory. It is a bit cumbersome to check whether it is a local connection, but it can be done.
  • Even if not designed to work on remote boxes, one can imagine a situation where is works and is valid. Imagine 2 machines, one with the server, another one with mariabackup, that share data directory, and it is mapped to the same place on both machines. Backup is possible in this case, and one could argue, not exactly illegal.
Comment by Zdravelina Sokolovska (Inactive) [ 2018-01-26 ]

RE Vladislav Vaintroub >>mariabackup, just like its predecessor xtrabackup, was not designed to work on remote boxes.
wlad Vladislav Vaintroub
then what's the option --host stands for ?
]# mariabackup | grep host
mariabackup based on MariaDB server 10.2.12-MariaDB Linux (x86_64)
-H, --host=name This option specifies the host to use when connecting to
host (No default value)

&& from user guide:
-H, --host
Defines the host for the MariaDB Server you want to backup.
--host=name
Using this option, you can define the host to use when connecting to a MariaDB Server over TCP/IP.

that issue in that case should be even set with critical severity because user may figure out that it is backpacking
any Remote MariaDB Server, but actually the it get something different ;

Comment by Vladislav Vaintroub [ 2018-01-26 ]

--host stands for this

it can be 127.0.0.1 if you want to connect over TCPv4-localhost(and your backup user has the form 'user'@'127.0.0.1')
it can be ::1 if you want to connect connect over TCPv6-localhost(you backup user has the form 'user'@'::1')
it can be one of the fully qualified DNS names of your computer, or one of your IP addresses (if you have several network interface cards, you may have both IPv4 and IPv6 addresses for each if them)
it can be localhost, in which case the connection on Unixes is done via unix domain socket

mariabackup needs to connect to server, thus it uses "host". mariabackup is a (special) client utility. Every client utility uses --host , Most importantly, dependent on how what you write in --host, you may connect with entirely different user, or not be able to connect at all. Even from the same local machine. User in MariaDB server is generally a combination of name and IP, and --host lets you control the IP.

Feel free to fix "user guide ( if you mean Knowlegde base article), or file a documentation bug if you think this is more appropriate

Comment by Vladislav Vaintroub [ 2018-01-26 ]

That mariabackup does not work remotely, is common knowlegde. Xtrabackup never worked remotely, and it exists since 2009. I agree that it might be confusing, for a first time user, but it is what it is, it is a clone a another thing they worked like this for almost a decade.

Comment by vigneshkumar [ 2022-08-30 ]

Is there a way to have the remote server data called in from host where your'e calling mariabackup. Eventually this is taking backup from local which doesn't make sense to have a broken cluster data and run into seamlessly running log consistency checks.
So are we having any option to deal this locally? i see a -h directory but its not helping my requirement.

Problem is we are routing the connection to --host=remote host and its complaining on local server. for which you will lead up to errors like open files and open os files error issues. which is misleading the engineers.

Please let us know if there is a workaround or fix to it in the near future.

Thanks & Regards,
Viggu

Comment by Vladislav Lesin [ 2023-05-03 ]

I would close is as "won't fix" as we have xbstream, which can stream backup, and that stream can be redirected to network with standard GNU tools like nc.

Generated at Thu Feb 08 08:18:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.