Skip to main content

Additional Custom Backup Folder Selection?

Comments

9 comments

  • cPanelMichael
    Hello @BobHoliday, Including custom files or directories with system backups is supported. We document how to do this at:
    0
  • BobHoliday
    Bravo. Thank you :)
    0
  • cPanelMichael
    Hello @BobHoliday, I'm glad to see that helped. I've marked this thread as solved.
    0
  • BobHoliday
    A quick PS... does the 'etc' file in your example accept wildcards? Eg /etc/csf/*.allow ?
    0
  • cPanelMichael
    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
  • Paulgeee
    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? Thanks
    Hello @BobHoliday, Including custom files or directories with system backups is supported. We document how to do this at:
    0
  • cPanelMichael
    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
  • Paulgeee
    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
  • cPanelMichael
    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.