PDA

View Full Version : change backup path HOW?



Snowman
10-01-2009, 04:17 PM
Is there a way to change the path that user/reseller level backups are sent to?

currently its seems to be storing in /home/username/user_backups/

we have a couple of clients with massive ****es and its causing the /home partition to fill up

is it possible to adjust the path to send the backups to a second drive which is mounted as /backup ?

if so how as i cant see anywhere to adjust this one, only the admin level backups

scsi
10-02-2009, 08:03 AM
Dunno if its changeable. How are you going to give permissions so only the user has access to their files and their files only :)

Your going to probably have to use /usr/local/directadmin/scripts/custom/user_create_post.sh

With code like:



#!/bin/sh
rm -rf /home/$username/user_backups
mkdir /backup/$username
chown $username:$username
ln -s /backup/$username /home/$username/user_backups
exit 0

nobaloney
10-04-2009, 12:41 PM
I see an error in the script, but in general it should work. Give /backup (on it's own partition) the same ownership and rights as /home.

After the mkdir /backup/$username be sure to chmod it to 711.

Then it should work.

Jeff