Force backup to run using new 11.38 system

Status
Not open for further replies.

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
It appears that cpbackup-userskip.conf is ignored by the new backup system. Is there a way to add users to a skip list like before? Internal processes run and scan accounts that violate our backup policy, the accounts are added to this file and backups are skipped. It appears those accounts are actually being backed up by the new system.
This has been replaced by a value in the cPanel user file for the account. For example:

Code:
[email protected] [~]# 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.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
500 clicks, just to enable the backup - Way to go cpanel!

Are you guys losing the plot or what?
 

InterServed

Well-Known Member
Jul 10, 2007
268
14
68
cPanel Access Level
DataCenter Provider
Latest EDGE and CURRENT versions does contain the mass enable/disable function , most probably it will take 1 more week until it will reach RELEASE state.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
I wonder how many junior admins will disable old backup and enable new backup and wont manually enable the new backup on a per account level - leaving the system without backup.
Yes, the behaviour of the old system was to "allow all" and then disable individual accounts as necessary, which is the logical way to do it, so anyone (not just a junior admin) would assume that it would be the same in the new system.

Another point to make here is that it is logical to assume the old system will be retired eventually - so why combine the Enable / Disable users options for both systems on one page? Surely you'd want to keep them separate so that no extra work is required when the old system is finally removed from the WHM interface. You can still use "Select Specific Users" on the legacy backup configuration page, so why duplicate this? Most people will disable the legacy system. so why include options for it in the new system?
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
Hello!

I am aware that am not a seasoning cPanel Admin, but i have no clue what you are talking about.

Under the "Manage hooks" Version 11.38:
Home »Development »Manage Hooks

There is no mention to backups.

If i look on switch to the Standard Hook system, I don't get nothing.

Could you point me out to the right direction please?
BUMP!

It was so easy to drop a postcpbackup file in before. Now what do we need to do?
 

JamesOakley

Well-Known Member
Apr 15, 2011
83
2
58
cPanel Access Level
Root Administrator
It seems that postcpbackup still runs automatically - there is no need to tick a box to include it.

precpbackup, however, does not run, so it would need the Hook system - the documentation for which is not transparent to me. I don't need pre- yet, but I'm hoping that cPanel will document this more clearly before I do need it, because I don't want to think needlessly hard about how it's done.

I hope postcpbackup is meant to be running, otherwise my need to understand the new system would become more pressing.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
Documentation for standardized hooks is available at cPanel & WHM's SDK Hooks

Here is a quick, untested, example of adding a post backup event hook:
Code:
[localhost - root - /usr/local/cpanel cpanel ]
$ ./bin/manage_hooks add script /root/hooks/post_backup --category=System --event=Backup --stage=post
Hook failed to return proper JSON data
WARNING: No "describe" pattern found in script. It is HIGHLY recommended to pass the "--manual" when providing hook descriptors on the command line.
Added hook for System::Backup to hooks registry
Note: The "noise" in the output is typical, but seems alarming. Please ignore it for now.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
An example is exactly what I needed to make sense of the more complete documentation.

Presumably one uses --stage=pre for a pre-backup event hook?
You are correct about --stage.

Please also note that the location of the hook script is up to you. I used /root/hooks in my example for illustration only. :)
 

getresults

Registered
Nov 14, 2006
2
0
151
Documentation for standardized hooks is available at cPanel & WHM's SDK Hooks

Here is a quick, untested, example of adding a post backup event hook:
Code:
[localhost - root - /usr/local/cpanel cpanel ]
$ ./bin/manage_hooks add script /root/hooks/post_backup --category=System --event=Backup --stage=post
Hook failed to return proper JSON data
WARNING: No "describe" pattern found in script. It is HIGHLY recommended to pass the "--manual" when providing hook descriptors on the command line.
Added hook for System::Backup to hooks registry
Note: The "noise" in the output is typical, but seems alarming. Please ignore it for now.
Hi Kenneth,

I'm running CENTOS 5.9 x86_64 virtuozzo – web WHM 11.38.2 (build 2) on a VPS. The new backup system is enabled and the legacy backup is disabled.

I've tried to add a new hook using the above as an example.

Code:
./manage_hooks add script /root/scripts/dailypostbackup.sh --category=System --event=Backup --stage=post
The manage_hooks command just hangs and I have to ^C.

Running ./bin/manage_hooks list | grep -i backup returns no results.

Any suggestions would be greatly appreciated.

Thanks!
 

InterServed

Well-Known Member
Jul 10, 2007
268
14
68
cPanel Access Level
DataCenter Provider
Hi,

Note that when running that hook command , it will also execute your dailypostbackup.sh script (reason why you think it hangs).
So you can either let your dailypostbackup.sh empty while registering the hook and add your script content after or wait until your script finishes the configured tasks.
 

screege

Well-Known Member
Aug 11, 2004
190
1
166
I have enabled the new backup system and diabled the legacy backup and it is not doing the backup just creates this dirs:

[email protected] [/backup/2013-10-19]# du -h
2.0M ./accounts
136K ./system/files
185M ./system/dirs
185M ./system
187M .

My old backups measured 60 gb can anyone help?
 

screege

Well-Known Member
Aug 11, 2004
190
1
166
Sorry didn{t saw the op´tion to select betwenn legacy and new system under users.
 

JamesOakley

Well-Known Member
Apr 15, 2011
83
2
58
cPanel Access Level
Root Administrator
You can do this by editing /etc/cpbackup.conf

Add PREBACKUP 1 in /etc/cpbackup.conf for precpbackup and POSTBACKUP 1 in /etc/cpbackup.conf for postcpbackup.
I'm not sure quite what you're saying can be done that way, but my understanding was that /etc/cpbackup.conf only related to the legacy backup system. Or am I mistaken?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Yes /etc/cpbackup.conf is the configuration file of cpanel backup. Please ignore my last reply it was by a mistake. It was answer to the question "Could you let us know how to enable the precpbackup and postcpbackup?" :)
The /etc/cpbackup.conf file only applies to the legacy backup system. The new backup system configuration files are stored in:

Code:
/var/cpanel/backups
Thank you.
 
Status
Not open for further replies.