So far, no exclusions have been accounted for as fargs has not been passed.
Rework the logic for fargs parsing based on domain exclusions and pass fargs to the tar command.
Also add --anchored based on 37c69b8f4c
This change will fix issues with files like `public_html/wp-content/plugins/sitepress-multilingual-cms/classes/logs/interface-wpml-log.php` from being excluded, but still exclude the intended main logs directory. Fixes a semi-widespread issue with VestaCP and WPML.
Well, in one db.conf I found duplicated entry for the same database.
root@btvc:~# cat /usr/local/vesta/data/users/btvc2011/db.conf
DB='btvc2011_cart' DBUSER='btvc2011_9091dn' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='1' SUSPENDED='no' TIME='' DATE=''
DB='btvc2011_cart' DBUSER='btvc2011_admin' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='' DATE=''
DB='btvc2011_cart' DBUSER='btvc2011_david' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='' DATE=''
DB='btvc2011_cart' DBUSER='btvc2011_djn' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='' DATE=''
DB='btvc2011_cart' DBUSER='btvc2011_jd' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='' DATE=''
DB='btvc2011_cart' DBUSER='btvc2011_oscar' MD5='*' HOST='localhost' TYPE='mysql' CHARSET='UTF8' U_DISK='0' SUSPENDED='no' TIME='' DATE=''
Obviously different users has access to the same database.
I know that this is impossible to create in Vesta.
But @Skamasle thirt-party script for importing cPanels backup obviously CAN do that... and many people use that cPanel importer.
This fix will avoid databases that are already dumped.
Without this fix backup script get stuck on stdin waiting for:
gzip: /backup/tmp.4YlV9Yr4m5/db/btvc2011_cart/btvc2011_cart.mysql.sql.gz already exists; do you wish to overwrite (y or n)?