Additional Custom Backup Folder Selection?
I would like to include additional folders in the 'system' backups.
In the case of a total loss of my server, and then having to start from scratch with "only" a full WHM backup, there'd be a lot of work to do re-creating config files and any other customisations I'd made to a standard Linux/WHM server build.
Eg it'd be nice to backup /etc/csf.conf but WHM is not doing so I don't think.
Is there some config file where I can add locations to the 'system' backup?
Or is there perhaps a way to symlink from an existing system backup directory to another directory I want included?
Or do I need to set up a cron to tar some stuff and stick it somewhere that will get backed up, and schedule that to run prior to the start of my backups?
Or some other cunning way?
TY
-
Bravo. Thank you :) 0 -
Hello @BobHoliday, I'm glad to see that helped. I've marked this thread as solved. 0 -
A quick PS... does the 'etc' file in your example accept wildcards? Eg /etc/csf/*.allow ? 0 -
A quick PS... does the 'etc' file in your example accept wildcards? Eg /etc/csf/*.allow ?
Wildcards are not supported. You'll need to use the full path to each individual file, or enter the full directory path like this:/etc/csf
Thank you.0 -
Hello Would that include entire directories i.e (if I included a new directory in the root called /myfolder ?) # cat /var/cpanel/backups/extras/etc /myfolder/
or would I add /myfolder/* to include everything? ThanksHello @BobHoliday, Including custom files or directories with system backups is supported. We document how to do this at:
0 -
Hello @Paulgeee, Here's how the line would look in /var/cpanel/backups/extras/custom-filename if you wanted to backup the entire /myfolder directory: /myfolder
Thank you.0 -
Hello and thank you, I tried this out and it works a treat :) I noticed that it includes the tar backup in the /system/dirs/myfolder.gz directory. top levels being "system and accounts" is there a way to include another top level folder within the backup directory i.e. backup date..| _________..|accounts _________..|myfolder _________..|system I am trying to automate specific folders rather than individual files, I can create a separate script to do this but would rather rely on existing machine software. Thanks for your help Paul Hello @Paulgeee, Here's how the line would look in /var/cpanel/backups/extras/custom-filename if you wanted to backup the entire /myfolder directory:
/myfolder
Thank you.0 -
is there a way to include another top level folder within the backup directory i.e. backup date..| _________..|accounts _________..|myfolder _________..|system
Hello @Paulgeee, There's no supported way to do this directly, but you could setup a custom script to run automatically before or after each backup run as part of a hook: Guide to Standardized Hooks - Developer Documentation - cPanel Documentation Guide to Standardized Hooks - PkgAcct Functions - Developer Documentation - cPanel Documentation Thank you.0
Please sign in to leave a comment.
Comments
9 comments