Hacks:Engine:Disable backups per domain basis

From VHCP Support

Jump to: navigation, search

This hack allows the user to disable the daily backups for his domain simply by deleting the backups/ directory of his domain account. Important: before making the next changes you _must_ apply the changes of the second case of this page: Backups not working in 2.4.7.1. Not doing so will abort and prevent from working the backups engine.

Open /var/www/webadmin/engine/backup/vhcp-backup-all or /var/www/vhcp/engine/tools/vhcp-backup-all (it depends on your installation). Search for:

			if(! -d $dmn_backup_dir)
			{

after that line add:

			next;

Now, if a user deletes it's backups/ directory the backups engine will skip that domain instead of forcing the recreation of the backups directory. A more accurate approach to this would be to check for a .no-backup file, or add an entry on the database. To re-enable backups, create the backups/ directory and chown it to your uid and the apache's gid, and chmod to 0770.

Personal tools