The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpbackup-userskip.conf ignored by legacy backup system?

Discussion in 'Data Protection' started by BWS, Jul 12, 2013.

  1. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  4. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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?

    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.
     
  6. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    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.

    Yes

    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.


    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?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page