I’ve been following a guide to setup a remote backup process using innobackupex command to backup a MASTER’s database from a script run by the SLAVE server.
I created a user “backupuser” on the MASTER server to run the innobackupex command, but i’m stuck with this error
xtrabackup: Error: Please set parameter 'datadir' innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2579.
[COLOR=#B22222]It seems that if i try to run the innobackupex command but not as root, it can’t/won’t find the datadir. I tried using xtrabackup_55 to manually set the datadir and even the defaults-file but to no avail.
Both SLAVE and MASTER are using Percona-Server 5.5, and I’ve already setup the backupuser’s sudo access to /usr/bin/innobackupex-1.5.1 /usr/bin/innobackupex /usr/bin/xtrabackup /usr/bin/xtrabackup_55/ /usr/bin/xtrabackup_56 so that it won’t need to ask the password.
I’m hoping if anyone can give me a heads up of what i’m missing as I can’t just randomly change my permission for this user, since it’s an active test server. TIA
P.S this the my.cnf of the MASTER server if it helps,
[client] # CLIENT # user = root password = root [mysqld] # GENERAL # server_id = 3301 # DATA STORAGE datadir = /var/lib/mysql # BINARY LOG log-bin = mysql-bin expire_logs_days = 14 sync_binlog = 1 # REPLICATION # binlog-format = row # SAFETY # max_allowed_packet = 16M max_connect_errors = 1000000 skip-host-cache skip-name-resolve innodb_strict_mode = 1 # CACHES AND LIMITS # max_connections = 800 tmp_table_size = 32M max_heap_table_size = 32M thread_cache_size = 50 table_definition_cache = 4096 table_open_cache = 4096 # INNODB # innodb_flush_log_at_trx_commit = 1 innodb_file_per_table = 1 innodb_flush_method = O_DIRECT innodb_buffer_pool_size = 8G
AND this is the guide i was trying to follow… http://www.stevemeyers.net/2013/06/using-xtrabackup-to-backup-remote.html