Page MenuHomePhabricator
Paste P8183

(An Untitled Masterwork)
ActivePublic

Authored by Marostegui on Mar 12 2019, 11:28 AM.
Tags
None
Referenced Files
F28374482: raw.txt
Mar 12 2019, 11:28 AM
Subscribers
None
So far I have only seen usage issues when trying dumps:
- I would like to get an usage when I run backup_mariadb.py without options
- Testing dump s6:
-- bad mysql credentials for db1115 on purpose:
rotate: True
compress: True
archive: False
threads: 16
statistics:
host: 'db1115.eqiad.wmnet'
port: 3306
user: 'a_user'
password: 'a_password'
database: 'zarcillo'
sections:
section6:
host: 'dbstore2001.codfw.wmnet'
port: 3316
destination: 'localhost'
root@es2001:/tmp# sudo -u dump /home/marostegui/puppet/modules/profile/files/mariadb/backup_mariadb.py --config-file /home/marostegui/backups.cnf
root@es2001:/tmp#
That fails, but I would expect an error, instead of reporting nothing. The debug log reports bad mysql credentials.
- Testing dump s6 without specifying the dump user - should we include it on the example file?:
rotate: True
compress: True
archive: False
threads: 16
statistics:
host: 'db1115.eqiad.wmnet'
user: 'stats'
password: 'redacted'
database: 'zarcillo'
sections:
section6:
host: 'dbstore2001.codfw.wmnet'
port: 3316
destination: 'localhost'
root@es2001:/tmp# sudo -u dump /home/marostegui/puppet/modules/profile/files/mariadb/backup_mariadb.py --config-file /home/marostegui/backups.cnf
root@es2001:/tmp# cat /tmp/debug.log
DEBUG:section6:['/usr/bin/mydumper', '--compress', '--events', '--triggers', '--routines', '--logfile', '/srv/backups/dumps/ongoing/dump_log.section6', '--outputdir', '/srv/backups/dumps/ongoing/dump.section6.2019-03-12--08-30-18', '--rows', '20000000', '--threads', '16', '--host', 'dbstore2001.codfw.wmnet', '--port', '3316']
ERROR:section6:Incorrect metadata file
Having a timestamp on the debug.log file would be useful.
root@es2001:/tmp# cat /srv/backups/dumps/ongoing/dump_log.section6
2019-03-12 08:30:18 [ERROR] - Error connecting to database: Access denied for user 'marostegui'@'10.192.0.25'
- Testing a dump s6, with normal backups.cnf works fine.
- Being silly and trying to run a -only-postprocess (on the file, but adding it wrongly on purpose) as let's say the stats didn't generate correctly and I wanted to re-do them
only-postprocess: True
user: 'dump'
password: 'redacted'
rotate: True
compress: True
archive: False
threads: 16
statistics:
host: 'db1115.eqiad.wmnet'
user: 'stats'
password: 'redacted'
database: 'zarcillo'
sections:
s6:
host: 'dbstore2001.codfw.wmnet'
port: 3316
destination: 'localhost'
Moved the previously generated s6 dump from latest/ to ongoing/ and ran the backup with the above cnf:
root@es2001:/tmp# sudo -u dump /home/marostegui/puppet/modules/profile/files/mariadb/backup_mariadb.py --config-file /home/marostegui/backups.cnf
The full backup is generated.
I would have expected and error if the: only-postprocess line isn't correct but not just by pass it and do the full cycle
- Testing a stats generation with the correct backups.cnf works fine.