WHM Backups - Doesn't delete older backups to make room for new ones

telakos

Member
Feb 9, 2022
6
0
1
Greece
cPanel Access Level
Root Administrator
Hello all! Nice to be here, I'm very new to cpanel / whm server management.

We have a VPS at work and I have configured WHM to take backups for all cpanel users, it was working fine just before it stopped taking backups, after generating a number of backups for each user everyday, it just got stuck.

It seems to me that the problem is that it doesn't delete older backups in order to be able to generate new ones.

Needless to say that I generate backups manually every day for each user which is a pain in the #)$(

There has to be a tick somewhere in backup settings that says "DELETE OLDER BACKUPS TO MAKE ROOM FOR NEW ONES" but I don't seem to find...

What am I missing here?

Thanks in advance.
 
Last edited by a moderator:

quietFinn

Well-Known Member
Feb 4, 2006
1,653
329
438
Finland
cPanel Access Level
Root Administrator
The setting is in WHM -> Backup -> Backup Configuration -> Daily Backup -> Enter the number of daily backups that you wish to keep in the system at one time
 
  • Like
Reactions: telakos

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,422
1,633
363
cPanel Access Level
Root Administrator
Your issue could be what @quietFinn said, or it could also be a problem with the backups failing. If a backup fails for some reason it would only prune older backups if the "strictly enforce backup retention" option is enabled.

Are you getting any errors from the backup system? If not, then adjusting the number of daily backups to keep is likely the solution.
 
  • Like
Reactions: telakos

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,422
1,633
363
cPanel Access Level
Root Administrator
For the daily backups, that is a total retention number. Think of that number as "how many sets of backups will exist after the backups have completed and been pruned"

"1" would leave you with the most current daily backup. "7" would leave you with an entire week's worth of daily backups.
 
  • Like
Reactions: telakos

telakos

Member
Feb 9, 2022
6
0
1
Greece
cPanel Access Level
Root Administrator
Hello again.

Unfortunately I don't see any new backups generated for any of the users (cpanel accounts).

ok.png

Do I have to delete the old ones to make room for new ones ? How to delete and why the system didn't delete them automatically?

Thanks in advance.
 

telakos

Member
Feb 9, 2022
6
0
1
Greece
cPanel Access Level
Root Administrator
There's other reasons that the backups wouldn't be removed. Do you see any errors inside the backup logs on the server? These would be located at /usr/local/cpanel/logs/cpbackup and then each day has its own log file.
Can you please tell me how I can view these logs ? Do I access them via the terminal, how? How can I download them.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,422
1,633
363
cPanel Access Level
Root Administrator
These logs are only available to the root user. If you have root access to the server you could use the Terminal application in WHM to navigate to that directory and open the files with a text editor. If you wanted to download them to your local machine, you'd need to connect to the server with an FTP client as the root user to have access to those.

We're also happy to help examine the backup issue through a ticket if you'd like to contact our team.
 

telakos

Member
Feb 9, 2022
6
0
1
Greece
cPanel Access Level
Root Administrator
These logs are only available to the root user. If you have root access to the server you could use the Terminal application in WHM to navigate to that directory and open the files with a text editor. If you wanted to download them to your local machine, you'd need to connect to the server with an FTP client as the root user to have access to those.

We're also happy to help examine the backup issue through a ticket if you'd like to contact our team.
Hello thanks for the reply, I have root access to WHM, so what exactly should I type to the terminal in order to be able to see the log files or check if there is problems with the backup process?

About the ticket, how does this work ? Do we have to give you access to the WHM so you can take a look?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,422
1,633
363
cPanel Access Level
Root Administrator
Yes, if you submit a ticket you would grant us access and then we could check things on our side. We would also need SSH access to the server and not just WHM access.

Explaining how to use shell and a text editor is beyond the scope of the forums and cPanel support, so I'd recommend doing a bit of reading on that if you plan to manage a server as root. I'm hesitant to provide commands on how to open the file, because in a terminal there are also separate commands to search and close the file properly.

We do have some good articles on this that I'd recommend reading: