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

final error #373

Closed bimith closed 4 years ago

bimith commented 4 years ago

autoxtrabackup --backup -v -l DEBUG -lf /home/XB_TEST/backup_dir/xb.log --defaults-file=/home/XB_TEST/server_dir/bck.conf Traceback (most recent call last): File "/usr/local/bin/autoxtrabackup", line 11, in load_entry_point('mysql-autoxtrabackup==1.5.4', 'console_scripts', 'autoxtrabackup')() File "/usr/local/lib/python3.5/site-packages/Click-7.0-py3.5.egg/click/core.py", line 764, in call return self.main(args, kwargs) File "/usr/local/lib/python3.5/site-packages/Click-7.0-py3.5.egg/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.5/site-packages/Click-7.0-py3.5.egg/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.5/site-packages/Click-7.0-py3.5.egg/click/core.py", line 555, in invoke return callback(args, *kwargs) File "/usr/local/lib/python3.5/site-packages/Click-7.0-py3.5.egg/click/decorators.py", line 17, in new_func return f(get_current_context(), args, **kwargs) File "/usr/local/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.4-py3.5.egg/autoxtrabackup.py", line 185, in all_procedure config = GeneralClass(defaults_file) File "/usr/local/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.4-py3.5.egg/general_conf/generalops.py", line 15, in init con.read(config) File "/usr/local/lib/python3.5/configparser.py", line 696, in read self._read(fp, filename) File "/usr/local/lib/python3.5/configparser.py", line 1077, in _read raise MissingSectionHeaderError(fpname, lineno, line) configparser.MissingSectionHeaderError: File contains no section headers. file: '/home/XB_TEST/server_dir/bck.conf', line: 1 'mysqladmin=/usr/bin/mysqladmin\n'

BarbzYHOOL commented 4 years ago

add ``` at top and bottom plz

bimith commented 4 years ago

i didnt get please clearly tell

this is the way i have written conf file

mycnf=/etc/my_1.cnf mysqladmin=/usr/bin/mysqladmin mysql_user=root mysql_password=Mysql@123

Set either mysql_socket or host and post. If both are set socket is used

mysql_socket=/else/datastore_1/mysql.sock

mysql_host=localhost mysql_port=4417 datadir=/else/datastore_1

[Backup]

Optional: set pid directory

pid_dir=/new/MySQL-AutoXtraBackup tmpdir=/home/XB_TEST/mysql_datadirs

Optional: set warning if pid of backup us running for longer than X

pid_runtime_warning=2 Hours backupdir=/home/XB_TEST/backup_dir backup_tool=/usr/bin/xtrabackup

Optional: specify different path/version of xtrabackup here for prepare

prepare_tool=

xtra_prepare=--apply-log-only

Optional: pass additional options for backup stage

xtra_backup=--compact

Optional: pass additional options for prepare stage

xtra_prepare_options=--rebuild-indexes

Optional: pass general additional options; it will go to both for backup and prepare

xtra_options=--binlog-info=ON --galera-info

xtra_options=--no-version-check

Optional: set archive and rotation

archive_dir=/home/shahriyar.rzaev/XB_TEST/backup_archives

full_backup_interval=1 day

max_archive_size=100GiB

max_archive_duration=4 Days

Optional WARNING(Enable this if you want to take partial backups). Specify database names or table names.

partial_list=test.t1 test.t2 dbtest

gitmstoute commented 4 years ago

@bimith I see there are more details here - Just throw [mysql] at the top of the file and give it a shot?

gitmstoute commented 4 years ago

@bimith I assume it's a test / local dev env but you should also be careful not to share PWs on github (it's in your conf file).

bimith commented 4 years ago

Great !! i have successfully completed the full backup thanks Shahriyar: I have one more query when the db engine is myisam the incremental will not happen? please tell me

gitmstoute commented 4 years ago

It's a limitation of xtrabackup, rather than autoxtrabackup. It will not work for myisam tables. Consider changing table engines to innodb if you plan to use autoxtrabackup.

bimith commented 4 years ago

ok thanks dear for you reply.

one more query: xtra_prepare=--apply-log-only this option will not able to allow for INCREMANTAL BACKUPS after the full backups means monday's full backups cannot use for the tuesday's incremental backup this is using for commonly restoration part. Kindly advise me..

one more thing bin-log option is available in this tool that how much possibilities is giving for us when using this tool.

bimith commented 4 years ago

Shahariyar i would like to request you am going to implement this tool on this coming wednesday one of our client before that above asked my queries you kindly give the suggestions

bimith commented 4 years ago

It's a limitation of xtrabackup, rather than autoxtrabackup. It will not work for myisam tables. Consider changing table engines to innodb if you plan to use autoxtrabackup.