ShahriyarR / MySQL-AutoXtraBackup

MySQL-AutoXtraBackup commandline tool written in Python 3 based on Percona XtraBackup
https://autoxtrabackup.azepug.az/
MIT License
139 stars 79 forks source link

Testing fails - report them here #416

Closed ShahriyarR closed 3 years ago

ShahriyarR commented 4 years ago
# autoxtrabackup --backup 
Traceback (most recent call last):
  File "/usr/local/bin/autoxtrabackup", line 11, in <module>
    load_entry_point('mysql-autoxtrabackup==2.0', 'console_scripts', 'autoxtrabackup')()
  File "/usr/local/lib/python3.6/site-packages/click-7.1.2-py3.6.egg/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click-7.1.2-py3.6.egg/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click-7.1.2-py3.6.egg/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click-7.1.2-py3.6.egg/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click-7.1.2-py3.6.egg/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mysql_autoxtrabackup-2.0-py3.6.egg/autoxtrabackup.py", line 186, in all_procedure
AttributeError: 'GeneralClass' object has no attribute 'log_file_max_bytes'
ShahriyarR commented 4 years ago

TODO: add fallback=None to all optional arguments in config file. DONE.

ShahriyarR commented 4 years ago

Logger fails as:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.6/logging/handlers.py", line 936, in emit
    self.socket.send(msg)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/logging/handlers.py", line 857, in _connect_unixsocket
    self.socket.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

UPDATE: Fixed this by mounting /dev/log to docker container.

m7mdcc commented 3 years ago

Hii @ShahriyarR ,

How to solve this ? AttributeError: 'GeneralClass' object has no attribute 'log_file_max_bytes' Even i have log_file_max_bytes in my config

Edit : I reinstall using Branch 416

But now i got this :

2020-07-30 13:23:31 INFO [process_runner:52] SUBPROCESS /usr/bin/mysqladmin COMPLETED with exit code: 0
2020-07-30 13:23:31 INFO [check_env:81] OK: /usr/bin/mysql exists
2020-07-30 13:23:31 INFO [check_env:94] OK: /usr/bin/mysqladmin exists
2020-07-30 13:23:31 INFO [check_env:71] OK: MySQL configuration file exists
2020-07-30 13:23:31 INFO [check_env:106] OK: XtraBackup exists
2020-07-30 13:23:31 INFO [check_env:119] OK: Main backup directory exists
2020-07-30 13:23:31 INFO [check_env:147] OK: Full Backup directory exists
2020-07-30 13:23:31 INFO [check_env:159] OK: Increment directory exists
2020-07-30 13:23:31 INFO [check_env:131] Skipping check as this option not specified in config file...
2020-07-30 13:23:31 INFO [check_env:184] OK: Check status
2020-07-30 13:23:31 INFO [backuper:233] - - - - You have a full backup that is less than 86400.0 seconds old. - - - -
2020-07-30 13:23:31 INFO [backuper:235] - - - - We will take an incremental one based on recent Full Backup - - - -
Traceback (most recent call last):
  File "/usr/local/bin/autoxtrabackup", line 8, in <module>
    sys.exit(all_procedure())
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/autoxtrabackup.py", line 233, in all_procedure
    backup_.all_backup()
  File "/usr/local/lib/python3.8/dist-packages/backup_backup/backuper.py", line 240, in all_backup
    self.inc_backup()
  File "/usr/local/lib/python3.8/dist-packages/backup_backup/backuper.py", line 165, in inc_backup
    xtrabackup_inc_cmd = self.builder_obj.inc_backup_command_builder(recent_full_bck=recent_full_bck,
  File "/usr/local/lib/python3.8/dist-packages/backup_backup/backup_builder.py", line 178, in inc_backup_command_builder
    xtrabackup_inc_cmd_base += self.general_command_builder()
  File "/usr/local/lib/python3.8/dist-packages/backup_backup/backup_builder.py", line 63, in general_command_builder
    args += " {}".format(self.backup_options.get('xtra_options', default=''))
TypeError: get() takes no keyword arguments
ShahriyarR commented 3 years ago

Hi @m7mdcc sorry for the late reply, I am on vacation currently. So this error should be fixed by this PR -> https://github.com/ShahriyarR/MySQL-AutoXtraBackup/pull/417

But on the way, I got new errors and due to this, I have postponed merging. I will try to come back here again - also please keep in mind that these changes are for release version - 2.0 and this will be the most mature version of this tool. Stay tuned. If you wish to contribute please feel free to check out the release_v2.0 branch and start testing it.

ShahriyarR commented 3 years ago

I found time to play a bit now and the new logical issue is that after refactoring the backup streaming functionality seems to be broken. TODO: figure out why the streaming options were ignored and why the streaming itself did not raise the error.

ShahriyarR commented 3 years ago

closing for now. need to go further with release v2.0 branch.