c2oo / xtrabackup-manager

Automatically exported from code.google.com/p/xtrabackup-manager
0 stars 0 forks source link

Where does the value "mysql" inserted into scheduled_backup come from #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. xbm host add myserver "Prod_DB"
2. xbm backup add myserver "Prod_DB" CONTINC "50 16 * * *" "dbbackup" 
/var/lib/mysql/ backupuser "123password"
3. mysql> select * from scheduled_backups\G;
4. backup_user: mysql

What is the expected output? What do you see instead?
I do not want backup_user to default to 'mysql'. I want to be able to set the 
user myself.

What version of the product are you using? On what operating system?
Latest and greatest from subversion, on Ubuntu Linux 2.6.32-37-server

Please provide any additional information below.

This is how backup_user are fetched:

$backupGetter = new scheduledBackupGetter() <--- from services.class
$scheduledBackup = $backupGetter->getById(
$sbInfo = $scheduledBackup->getInfo();

$tempDir = $this->remoteTempDir->init($hostInfo['hostname'], 
$hostInfo['ssh_port'], $sbInfo['backup_user'], $hostInfo['staging_path'], 
'xbm-');

This is quite important since the same value are fetched and used as $user when 
connecting to a server with ssh.

$cmd = 'ssh -o StrictHostKeyChecking=no -p '.$port.' '.$user.'@'.$host." 'mkdir 
$path' 2>&1";

Where does the value "mysql" inserted into scheduled_backup come from ?

Original issue reported on code.google.com by jostm...@gmail.com on 11 Mar 2012 at 5:46

GoogleCodeExporter commented 8 years ago
Hi there - The default user is 'mysql' but you can edit this property of your 
scheduled backup task with:

xbm backup edit <hostname> <backup_name> backup_user "myNewUserName"''

FYI the default value comes from the MySQL table schema - that field has a 
default value of 'mysql' . This is why it is not clear from the code :)

Sorry about that.

Can you let me know if this solves your problem?

Original comment by lachlan....@gmail.com on 16 Apr 2012 at 9:52

GoogleCodeExporter commented 8 years ago
Yes it solves my problem, but it should really go into the documentation

Skickat från min HTC
Den 16 apr 2012 23:52 skrev <xtrabackup-manager@googlecode.com>:

Original comment by jostm...@gmail.com on 16 Apr 2012 at 10:55