#1 (permalink)  
Old 02-09-2010, 09:35 AM
Registered User
 
Join Date: Feb 2010
Location: Planet Earth
Posts: 5
Poopool is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-10-2010, 08:09 AM
cPanel Partner NOC
cPanel Partner NOC Badge
 
Join Date: Dec 2004
Posts: 376
forlinuxsupport is on a distinguished road
Wink Solution

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-10-2010, 08:43 AM
Registered User
 
Join Date: Feb 2010
Location: Planet Earth
Posts: 5
Poopool is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-10-2010, 10:37 AM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,901
Infopro is on a distinguished road
Lightbulb

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-10-2010, 04:30 PM
Registered User
 
Join Date: Sep 2006
Posts: 120
vanessa is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -5. The time now is 12:38 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc