|
|||
|
Modifying cpbackup script to skip home dir
Hi,
I'm going to make it short, I really appreciate some assistance. Here is the scenario : Let's say few hundred accounts are hosted on one server, backups are generating every week using /scripts/cpbackup for less than 2G accounts. Big accounts are excluding using /etc/cpbackup-userskip.conf now here is the question: is it possible to configure or modify /scripts/cpbackup to generate backup for those accounts that are over 2G but with --skiphomedir option? As you know if you run /scripts/pkgacct --skiphomedir user it generates backup but skips /home/user which is ideal for big accounts as you can restore backup on another server and copy homedir using rsync. I have the list of big accounts so that's not the problem, the only problem is to run /scripts/cpbackup with --skiphomedir for specific users in order to prevent overloading. thanks for your help |
|
|||
|
There are a couple of options.
1) You could exclude that user from the normal cpbackup and instead create cron job to do : /scripts/pkgacct --skiphomedir user 2) Create skip-dir files in the BIG directories : e.g. find /home/ -iname public_html -type d -exec touch {}/.cpbackup-skip \;
__________________
www.Forlinux.co.uk Linux Hosting & Support solutions Please note the information given is intended as advice only. |
|
|||
|
Thank you for your help, really appreciate it. Actually I prefer to use cpbackup script instead of writing a one myself as I need to ftp backup files to our backup server and cpbackup is already configured to do that.
If I can make a another version of cpbackup that uses pkgacct with --skiphomedir so I can use that for bigger accounts and the original one for smaller accounts that would be awesome. |
|
||||
|
You know, a nice idea for a Feature Request might be to have an option added to the Select Users screen in the Backup Configuration area where you could tick a checkbox for those large accounts you might want to have the homedir skipped. Or even the Edit account page if there was an extra option that could be turned on or off per account to skip the homedir that the backup script would see and react to appropriately.
Just thinking out loud here... |
|
|||
|
Edit /etc/cpbackup-exclude.conf and list the files/folder you don't want backed up.
On a per-account basis, you can edit the cpbackup-exclude.conf in the user's home folder to exclude files/folders for just that user. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| users in dir other than /home | mgdoyle | cPanel and WHM Discussions | 21 | 08-11-2005 08:16 AM |
| pure-ftp home dir | lbccserv | cPanel and WHM Discussions | 0 | 08-04-2005 09:47 AM |
| cpbackup does NOT backup Mysql Dir!? | Jedia | cPanel and WHM Discussions | 0 | 01-05-2005 07:30 PM |
| Custom home dir... etc | vogue | cPanel and WHM Discussions | 3 | 03-20-2004 04:44 PM |
| Default Home Dir - PROBLEM | WildWayz | cPanel and WHM Discussions | 1 | 04-25-2002 08:40 PM |