OpenID
Log In | Register
Skip to main content
Recent Posts
11
WHM Backup Solutions Script Support / Scrip not running error_log created at directory root
Last post by Steve -
I've installed the scrip as outlined in the documentation and setup the 2 crons as outlined however the script generates an error every 10 mins.

The error_log is located at the root of the script (same place the whmbackup.php file is located) and shows the following:

(directory path has been changed below for privacy, the actual log shows the correct path)
[28-Dec-2021 10:20:03 Europe/London] PHP Notice:  Trying to access array offset on value of type bool in /home/user/directory/resources/functions.php on line 260
[28-Dec-2021 10:20:03 Europe/London] PHP Notice:  Trying to access array offset on value of type bool in /home/user/directory/resources/functions.php on line 261

Worth noting no errors are shown in the logs directory
12
WHM Backup Solutions Script Support / Re: Script is not deleting older backups
Last post by Pete -
Hi,

I'm really sorry for not getting back to you. I've recently had to minimise support to this script due to COVID-19 work issues and the arrival of my first child.

After spending a bit of time testing, it would appear on your setup, the reason for the issue is the execution time. The root cause of the issue relates to the ftp retention script checking if each file is actually a file or is actually a directory. It seems to be that for the first file this takes 1 second, for the second file it takes 2 seconds and for the third file it takes 3 seconds and so on. With the number of backups you have, this can cause the FTP_CHDIR command to take over 40 seconds in some cases causing the script to time out. This is a bug with what seems to be PHP and the FTP server.

It should be noted that this should not happen. I'm currently looking into modifying the ftp retention script to do this check an alternative way and therefore significantly reduce the time and stop the error occurring. I will hopefully have an answer over the next few days.

Once again, I apologise for the delay in my response to you. I am still supporting this script, however I won't be able to respond as quickly as I usually do and may now take a few weeks to resolve issues.
13
WHM Backup Solutions Script Support / Script is not deleting older backups
Last post by louW -
The script is not deleting older backups from FTP, I do have a cron job running for the ftp_retention.php they are as follows

Error log

[19-Aug-2020 00:02:04 Europe/London] PHP Warning:  ftp_delete(): "/" is your current location in /home/xxxxxxx/v2/ftp_retention.php on line 18

Have sent you an email  (Mon, 24 Aug, 14:37) & added an issue on bitbucket with all required information just not heard anything back.

Any news on looking at the issue?
15
WHM Backup Solutions Script Support / Re: Can WHMbackup be used without reseller account?
Last post by Pete -
Hi,

WHM Backup Solutions would be great for that. A reseller account is essentially root with just a few less privileges. So yes, instead of entering the reseller login details in the config file just enter your root details. I highly recommend using the API Token with restricted permissions however as shown on the FAQ page. Just to keep safety in mind :).
16
WHM Backup Solutions Script Support / Can WHMbackup be used without reseller account?
Last post by vesperax -
I'm using WHM as root user (with 5 configured cPanel accounts), but I don't have a reseller account configured. Is there a way to use the WHMbackup solution as a root user?
What I'm trying to achieve is to use the standard WHM backup for local backups (7x daily and 2x monthly), but I would like to transfer just the 2x monthly backups to the remote backup server (WHM would normally transfer all created backups to the remote server). So, ideally, I would use the standard WHM backup service for the 7x daily and 2x monthly local backups, and then configure the WHMbackup script to create and transfer just, for example, weekley backups to the remote backup server. Would this be possible?
17
Change Log / V1.5
Last post by Pete -
  • BUG FIX: Resolved issues using ftp_retention.php with a custom configuration file when run via CLI/Cron Job.
18
WHM Backup Solutions Script Support / Re: The subprocess ended prematurely because it received the “KILL” (9) signal.
Last post by Pete -
Hi,

I'm glad you were able to identify and resolve the issue.
Unfortunately the issue with regards to requiring home directory storage space is something that i've looked at several times with no workaround possible. The only thing I could do is build in storage usage indication into the script. Which i'm currently looking into.
19
WHM Backup Solutions Script Support / Re: The subprocess ended prematurely because it received the “KILL” (9) signal.
Last post by rob_van -

It's still happening..  so this has nothing to do with it.    I'm sure the whm/cpanel is not getting the successful transfer backup message so after much more searching..   I found that azure closes there connections after 4 mins.  They rely on keep alive.  With no way to support keepalive on a reseller server - I was able to find a way to change this setting - I used the max of 30 mins.

https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout#set-the-tcp-timeout-on-a-load-balanced-rule-to-15-minutes

I will post back if this resolve the problem

Okay this did infact solve the problem.  Hope this helps someone else..   So the problem was with my router (azure) time out setting on the ftp server side.  But upon closer examination.. I can see the backup file for each account is dumped into the users home directory while its being transferred (or at least that is how it configured on my reseller host).  This may pose a problem if the account is more then 3/4 of the way full.  As the compressed backup may push the account out of space.  I assumed that a temp file was written somewhere but apparently not.  I guess I could just write a script that removes the backups daily.  Actually its' not a bad idea to run it just incase the FTP transfer fails and the backup is not removed (the account could then run out of space). 

I guess the take away or warning to anyone else using this method of backup - Make sure you have enough space in the home dir to cover the backup while it's running or emails or uploads to the account are going to fail. 
20
WHM Backup Solutions Script Support / Re: The subprocess ended prematurely because it received the “KILL” (9) signal.
Last post by rob_van -
I enabled logging on my FTP server to see if that would shed some light.

I noticed in the log that because this backup is much larger than the rest of them.. the next backup starts before this one completes.  I had them spaced out 10 mins apart (the one cron job is set to run every 10 mins).   Normally they complete within a min or two including ftp upload.  But this one takes 13 mins to complete from start to finish.   It takes 6 mins to build the backup then another 7mins to transfer and the next one is already running by the time this one starts.

I also noticed that the upload does complete but there is no goodbye message just shows it completed then disconnected.  The other backups show a goodbye message.  So i'm hoping this is because it has something to do with the next backup already starting from the same server.  

Would be nice if you could disable keeping the backup file in the home directory weather it thinks the backup successfully transferred or not.  If anyone knows if this could be scripted; let me know as i have no idea.  But I can see problems for others if an ftp backup transfer gets interrupted or something happens.. most likely it would be more important to discard the backup then to clog up the home directory.

So for now i've adjusted the backups to run every 30 mins instead of 10.  Giving large backup plenty of time to complete.   I will report back if adjusting the backup period resolves the issue.  I'm hoping that it does.

It's still happening..  so this has nothing to do with it.    I'm sure the whm/cpanel is not getting the successful transfer backup message so after much more searching..   I found that azure closes there connections after 4 mins.  They rely on keep alive.  With no way to support keepalive on a reseller server - I was able to find a way to change this setting - I used the max of 30 mins.

https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout#set-the-tcp-timeout-on-a-load-balanced-rule-to-15-minutes

I will post back if this resolve the problem