Current time: 04-20-2024, 06:37 AM Hello There, Guest! (LoginRegister)


Post Reply 
Exclude dir from the backup
Author Message
Diego Offline
Junior Member
*

Posts: 30
Joined: Sep 2009
Reputation: 0
Post: #1
Exclude dir from the backup
I have changed this line on the file:
/var/www/ispcp/engine/quota/ispcp-dsk-quota

and included the folllowing
Quote:--exclude="store/htdocs/download/*"

So I don't want that do be included on the backup, is that correct?

Quote: my $s = `$cmd_du --exclude="backups/$domain_name-*.lzma" --exclude="backups/$domain_name-*.bz2" --exclude="backups/$domain_name-*.gz" --exclude="backups/*.sql.lzma" --exclude="backups/*.sql.bz2" --exclude="backups/*.sql.gz" --exclude="logs/*.log" --exclude="store/htdocs/download/*" -s -B1
04-08-2010 07:34 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Exclude dir from the backup
why quota???

in engine/backup/ispcp-backup-all, change this line:
Code:
$backup_cmd = "$cmd_tar --create --directory=$dmn_dir --$zip --file=$www_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups . 2> $www_dir/$backup_filename.log";
/J
04-09-2010 12:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Diego Offline
Junior Member
*

Posts: 30
Joined: Sep 2009
Reputation: 0
Post: #3
RE: Exclude dir from the backup
(04-09-2010 12:27 AM)joximu Wrote:  why quota???

in engine/backup/ispcp-backup-all, change this line:
Code:
$backup_cmd = "$cmd_tar --create --directory=$dmn_dir --$zip --file=$www_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups . 2> $www_dir/$backup_filename.log";
/J

Thanks
(This post was last modified: 04-15-2010 12:50 PM by Diego.)
04-15-2010 12:49 PM
Find all posts by this user Quote this message in a reply
mwlake Offline
Junior Member
*

Posts: 18
Joined: Oct 2008
Reputation: 0
Post: #4
RE: Exclude dir from the backup
(04-09-2010 12:27 AM)joximu Wrote:  why quota???

in engine/backup/ispcp-backup-all, change this line:
Code:
$backup_cmd = "$cmd_tar --create --directory=$dmn_dir --$zip --file=$www_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups . 2> $www_dir/$backup_filename.log";
/J

I was also instructed to edit the "ispcp-dsk-quota" file. Didn't work though. Could you post an example for instance how to exclude all domainname.com/htdocs/cache folder and contents from daily backup using your method? Also, once the edit has been made, is it necessary to restart any service?
03-20-2012 08:12 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Exclude dir from the backup
Code:
$backup_cmd = "$cmd_tar --create --directory=$dmn_dir --$zip --file=$www_dir/$backup_filename --exclude=logs --exclude=phptmp --exclude=backups  --exclude=htdocs/cache . 2> $www_dir/$backup_filename.log";

See last exclude parameter.

No need to restart anything - maybe be sure to not edit the file during a nightly backup :-)

/J
03-21-2012 10:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: