.htaccess randomly does not get backed up

cirint

Registered
Jul 27, 2021
2
0
1
GB
cPanel Access Level
Root Administrator
Hi,

I run 4 instances parallel of the below command in custom scripts (otherwise backups take too long)
/scripts/pkgacct --skipacctdb --userbackup ${LIST_OF_ITEMS[$j]} $BACKUP_DIR

and experience that with random accounts that public_html/.htaccess file is missing.

With those accounts I see messages during backup

Code:
[2021-07-27 03:53:18 +0100] WARN: Warning(s) encountered in tar during archiving:
[2021-07-27 03:53:18 +0100] b_find(): /var/backups/accounts/backup-7.27.2021_03-45-20_cgdent/htaccess/_home_cgdent_public_html_.htaccess: No such file or directory
[2021-07-27 03:53:18 +0100] b_find(): /var/backups/accounts/backup-7.27.2021_03-45-20_cgdent/htaccess/_home_cgdent_public_html_.htaccess: No such file or directory[2021-07-27 03:53:18 +0100] ERROR: The subprocess “Archive::Tar::Builder” reported error number 2 when it ended.: b_find(): /var/backups/accounts/backup-7.27.2021_03-45-20_cgdent/htaccess/_home_cgdent_public_html_.htaccess: No such file or directory
[2021-07-27 03:53:18 +0100] b_find(): /var/backups/accounts/backup-7.27.2021_03-45-20_cgdent/htaccess/_home_cgdent_public_html_.htaccess: No such file or directory at /usr/local/cpanel/Cpanel/IO/Tarball.pm line 323.
[2021-07-27 03:55:20 +0100] pkgacct started.
and there is no backup summary at the end but the next pkgacct session is starting.

Permission of file looks fine
-rw-r--r-- 1 cgdent cgdent 902 May 19 07:04 /home/cgdent/public_html/.htaccess

as well as the archive files.

I wonder why parallel running cause such problems and how it can be fixed?

Thanks
 

cirint

Registered
Jul 27, 2021
2
0
1
GB
cPanel Access Level
Root Administrator
Hi,

yes it does and also gives a nice summary at the end

Code:
[2021-07-28 07:35:04 +0100] Done
[2021-07-28 07:35:04 +0100] pkgacctfile is: /tmp/z/backup-7.28.2021_07-28-49_cgdent.tar.gz
[2021-07-28 07:35:07 +0100] md5sum is: a9f04eba5b06cd3dc5afadccbc1f3c47
[2021-07-28 07:35:07 +0100]
[2021-07-28 07:35:07 +0100] size is: 739838049
[2021-07-28 07:35:07 +0100]
[2021-07-28 07:35:07 +0100] homesize is: 2112425984
[2021-07-28 07:35:07 +0100]
[2021-07-28 07:35:07 +0100] homefiles is: 94732
[2021-07-28 07:35:07 +0100] pkgacct completed
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,496
1,009
313
cPanel Access Level
Root Administrator
Thanks for that confirmation. I'm wondering if there is an issue with multiple instances of that running at once causing conflicts, but I can't say for sure what that may be. It might be best to try and strace the custom script to see if that gives you any useful details.