cpbackup-userskip.conf ignored by legacy backup system?

BWS

Active Member
Nov 20, 2003
42
0
156
Hi,

We've got a pretty customised backup system running here, and whilst the new backup system sounds great until weekly backups with retentions are enabled in it (see this thread) we'll have to stick with legacy.

However something appears to be broken in legacy now.

We generate a cpbackup-userskip.conf on a daily basis based on certain criteria, but this doesn't appear to be being read by legacy anymore? In fact I think the code to do it may have been removed?

If I remove a user from cpbackup-userskip.conf (which contains a list of all users) that user should be backed up. This doesn't happen.

If I remove a user from cpbackup-userskip.conf it doesn't show as legacy enabled in the User Backup Selection tool in WHM.
However if change the options for a user in the User Backup Selection tool, it DOES rewrite the cpbackup-userskip.conf, so I assume the aim is to continue using this file for legacy?

Running: WHM 11.38.1 (build 6).

All ideas appreciated?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

This has been replaced by a value in the cPanel user file for the account. For example:

Code:
root@server [~]# grep BACKUP /var/cpanel/users/cptest01
BACKUP=1
LEGACY_BACKUP=1
The above output will occur on accounts with backups enabled on both the new and legacy systems. Setting the values to 0 will disable backups for that account.

Thank you.
 

BWS

Active Member
Nov 20, 2003
42
0
156
Thanks Michael,

We modified our scripts to make this work (actually it simplified our scripts tremendously!), it's working on several of our servers no problem at all.

However, one of our servers, even though we update the accounts we want to backup on that day to "LEGACY_BACKUP=1" it makes them "LEGACY_BACKUP=0" at some point during the backup process and ignores them!

I've even run /usr/local/cpanel/scripts/updateuserdomains before running the backup? Any suggestions?
 

BWS

Active Member
Nov 20, 2003
42
0
156
Would I be correct in assuming that if I update it in /var/cpanel/users/username I also need to update that /etc/cpbackup-userskip.conf at the same time as they have some sort of dependency on each other? Just testing the theory with a backup on one server at the moment.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
However, one of our servers, even though we update the accounts we want to backup on that day to "LEGACY_BACKUP=1" it makes them "LEGACY_BACKUP=0" at some point during the backup process and ignores them!

I've even run /usr/local/cpanel/scripts/updateuserdomains before running the backup? Any suggestions?
Do you notice the matching user selections in "WHM Home » Backup » Backup User Selection" after making the change to the cPanel user files? Is the legacy backup system enabled and set to backup the accounts? Are there any third-party applications installed that could be modifying the cPanel user files?

Would I be correct in assuming that if I update it in /var/cpanel/users/username I also need to update that /etc/cpbackup-userskip.conf at the same time as they have some sort of dependency on each other? Just testing the theory with a backup on one server at the moment.
You should not have to manually update the /etc/cpbackup-userskip.conf file. It should be automatically populated with the usernames that are excluded from legacy backups.

Thank you.
 

BWS

Active Member
Nov 20, 2003
42
0
156
Do you notice the matching user selections in "WHM Home » Backup » Backup User Selection" after making the change to the cPanel user files?
Yes, if we make the changes via our script to add LEGACY_BACKUP=1 to those accounts in /var/cpanel/users/username then they are reflected there.

Is the legacy backup system enabled and set to backup the accounts?
Yes

Are there any third-party applications installed that could be modifying the cPanel user files?
No, procedure as follows:
- Update user files
- Check the changes are reflected in WHM Backup User Selection
- Execute cpbackup
- At some point during cpbackup (before accounts start to be backed up) all files in /var/cpanel/users get rewritten, only those that I've manually selected from WHM remain with LEGACY_BACKUP set to 1, the rest are reset to 0.


You should not have to manually update the /etc/cpbackup-userskip.conf file. It should be automatically populated with the usernames that are excluded from legacy backups.
I've rewritten our skips to also manually update this and it now works as intended. Not your intended behaviour but it works, possibly a bug?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I've rewritten our skips to also manually update this and it now works as intended. Not your intended behaviour but it works, possibly a bug?
After testing further, it does appear to be the intended behavior. Since you are manually updating the files, it's a good idea to manually update /etc/cpbackup-userskip.conf file to reflect the selection changes for legacy backups.

Thank you.