I wanted to know if its possible to modify the backups in a way that if the site is no longer on the server, the backup files will be deleted.
Can I make it like.. delete the daily, THEN do the backup?
I wanted to know if its possible to modify the backups in a way that if the site is no longer on the server, the backup files will be deleted.
Can I make it like.. delete the daily, THEN do the backup?
I saw this
In the cpbackup.... That doesnt exist, if I make it, will it run before the backup?PHP Code:if ( $CONF{'PREBACKUP'} && -e '/scripts/precpbackup' && -x _ ) {
print "[cpbackup] Executing user defined pre backup script (/scripts/precpbackup).\n";
system '/scripts/precpbackup';
}
Creating /scripts/precpbackup, yes - if created, it will run before the backup generation begins.
Here's a link to all post- scripts that can be created for a cPanel/WHM environment:
ScriptHooks < AllDocumentation < TWiki
Also, for every post- script, you can also create a pre- script.
Thats awesome, how about switching the method to scp from ftp?
I created /scripts/precpbackup With this in it
Didnt do a damn thing.. any idea?PHP Code:#!/bin/bash
rm -rf /backup/cpbackup/daily/
mkdir /backup/cpbackup/daily/
exit 0
bump? Still stuck
Goin with r1soft
Hmm, I recommend submitting a support ticket so we can diagnose this: http://tickets.cPanel.net/submit