ShahriyarR / MySQL-AutoXtraBackup

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

Upgrade from 1.5.2 to 1.5.3 - errors #332

Closed BarbzYHOOL closed 5 years ago

BarbzYHOOL commented 5 years ago

I updated (1.5.2 -> 1.5.3) as root, and then I check /root/.autoxtrabackup and it doesn't exist

@ShahriyarR

BarbzYHOOL commented 5 years ago

Also when I run it: runuser -s "/bin/sh" mysql -c "autoxtrabackup --backup -v -l DEBUG" FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mysql/.autoxtrabackup/autoxtrabackup.log'


Ah okay I need to change default log location :(

BarbzYHOOL commented 5 years ago

So if i set another logfile or run it as root:

Traceback (most recent call last):
  File "/usr/local/bin/autoxtrabackup", line 11, in <module>
    sys.exit(all_procedure())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/autoxtrabackup.py", line 202, in all_procedure
    validate_file(defaults_file)
  File "/usr/local/lib/python3.6/dist-packages/autoxtrabackup.py", line 107, in validate_file
    raise FileNotFoundError("Specified file does not exist.")
FileNotFoundError: Specified file does not exist.
BarbzYHOOL commented 5 years ago

Alright needed to set the --defaults_file option (this is an horrible name xD, it should be "--config" and "-c")

Now I get this new error:

2018-12-26 17:54:08 DEBUG    - - - - We will take an incremental one based on recent Full Backup - 
2018-12-26 17:54:08 DEBUG    <pid.PidFile object at 0x7fb138eca908> closing pidfile: /tmp/autoxtrabackup/pid/autoxtrabackup.pid
Traceback (most recent call last):
  File "/usr/local/bin/autoxtrabackup", line 11, in <module>
    sys.exit(all_procedure())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/autoxtrabackup.py", line 266, in all_procedure
    b.all_backup()
  File "/usr/local/lib/python3.6/dist-packages/master_backup_script/backuper.py", line 917, in all_backup
    self.inc_backup()
  File "/usr/local/lib/python3.6/dist-packages/master_backup_script/backuper.py", line 815, in inc_backup
    logger.debug("The following backup command will be executed {}".format(filteredargs))
UnboundLocalError: local variable 'filteredargs' referenced before assignment
2018-12-26 17:54:08 DEBUG    <pid.PidFile object at 0x7fb138eca908> closing pidfile: /tmp/autoxtrabackup/pid/autoxtrabackup.pid
BarbzYHOOL commented 5 years ago

And now I reverted to 1.5.2 it's bugged. Damnit, last time I try to upgrade

ShahriyarR commented 5 years ago

The last one is already known issue :) It is fixed but not released yet, will be released as part of 1.5.4

ShahriyarR commented 5 years ago

@BarbzYHOOL I will kindly ask you to test 1.5.4 version as i am going to improve some vital things. So if you have time checkout please release_v1.5.4 branch and do your best to break it)

ShahriyarR commented 5 years ago

Merged to release_v1.5.4. Closing.

BarbzYHOOL commented 5 years ago

"So if you have time checkout please release_v1.5.4 branch and do your best to break it)"

Ok lol i'm gonna try

BarbzYHOOL commented 5 years ago

@ShahriyarR Collecting mysql-autoxtrabackup== Could not find a version that satisfies the requirement mysql-autoxtrabackup== (from versions: 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.5.0, 1.5.1, 1.5.2, 1.5.3) No matching distribution found for mysql-autoxtrabackup==

no 1.5.4

ah yes i use pip3 to install actually, not git

ShahriyarR commented 5 years ago

:) Yes you need to clone repo, then checkout to release_v1.5.4 branch and then setup using setup.py install.

BarbzYHOOL commented 5 years ago

Installed with pip3 install git+https://github.com/ShahriyarR/MySQL-AutoXtraBackup@release_v1.5.4 but it says Successfully installed mysql-autoxtrabackup-1.5.3 However here you didn't update the magic number https://github.com/ShahriyarR/MySQL-AutoXtraBackup/blob/release_v1.5.4/setup.py so i guess it's fine (please don't forget small things like that :D)

I tried the same commands and it works now. However I have some small suggestions to make the usage more practical/consistent

ShahriyarR commented 5 years ago

:)) I did not forget. In general the version bump will be happen at the end of all feature implementations and fixes. When the release process ends, it will be merged to master branch with updated version number. The strategy I am using here is simple:

BarbzYHOOL commented 5 years ago

i think you should bump version number as soon as you create the branch but it's minor :D