Hi,
I havent checked the forums for a while and just noticed that I wasnt the only one after all to try exclude files or directories from Sysbk.
I also saw the following feature in the comming DA 1.232
"Change sysbk to create a backup file for each user intead of creating one large home.tar.gz file. This will also prevent /home/backup from being included in the backups..."
This is great , I like the idea of individual smaller files and it fixes my initial problem. What it does not fix is the fact that I still need to exclude a huge 3gig directory /home/admin/stuff which I dont want backed up.
I'm sure other people will come accross this issue so i'll explain how I got around it a while back.. who knows, it migh also give an idea to the DA team.
Warning !! ... if you make this little change, i'm pretty sure it will be wiped when upgrading to 1.232 and would have to be done again .. assuming it can still be done
1) make an exclude file with the directories/files you want to exclude. Path without leading slash as it is relative to where sysbk is when taring each "custom" directory. In my case :
# pico /usr/local/sysbk/mod/exclude
home/backup/*
home/admin/stuff/*
(Note, in my case, "home/admin/stuff/*" I guess will have to me replaced by "admin/stuff/*" after upgrading to 1.232)
2) modify Sysbk config file so the tar command reads the exclude file :
# pico /usr/local/sysbk/conf.sysbk
Find the ARC_PRI= section, not far from the top and make it look like :
if [ "$OS" = "FreeBSD" ]; then
ARC_PRI="/usr/bin/tar -X $MODPATH/exclude -cpzf"
else
ARC_PRI="/bin/tar -X $MODPATH/exclude -cpzf"
fi
3) Modify the conf.sysbk template file otherwise the above (2) will be wiped when you save modifications in the System Backup section of DA.
#pico /usr/local/directadmin/data/templates/conf.sysbk
same as (2) , find section and make it look like :
if [ "$OS" = "FreeBSD" ]; then
ARC_PRI="/usr/bin/tar -X $MODPATH/exclude -cpzf"
else
ARC_PRI="/bin/tar -X $MODPATH/exclude -cpzf"
fi
That's it, it's been working fine for me.
Miky