PDA

View Full Version : Backup


smartcall
9th February 2007, 21:23
Hi again,

Is there any way to make backups that are invoked from the panel to be performed as root.
I ask because I run suPHP without open_basedir restriction in effect and my users chmod some of their config files to 600. The sites run fine that way but the backup script can't read the chmodded files.
Another workaround would be to run the script as the user that invokes it. But I believe this is more complicated, because the user could be a reseller or one with more webs than one, wanting to backup all of them in one setting.

So the root user is the one to make backups in my case. Is it possible?



Thanks.

till
10th February 2007, 20:38
The only nackup functionality that runs as root user in ISPConfig is the automatic nightly backup which can be activated in the config.inc.php file. The backups where stored in a directory named backup inside the website root dir.

smartcall
11th February 2007, 16:13
Thanks!

And will every next backup delete the previous one. Or they will be filling the disk space of the user untill the quota is over.

falko
12th February 2007, 15:46
Or they will be filling the disk space of the user untill the quota is over.
They will fill up the disk space, so you better watch them regularly.;)

smartcall
12th February 2007, 17:33
So, I could add a code to your backup script that will delete the backup from the previous day. Or delete the whole folder and then create it again?

Where is the script located?

Thanks.

falko
13th February 2007, 18:46
So, I could add a code to your backup script that will delete the backup from the previous day. Or delete the whole folder and then create it again?Yes.

Where is the script located?

Thanks.It's in the /root/ispconfig scripts/shell directory.

This link might be interesting for you: http://www.howtoforge.com/forums/showthread.php?t=7040&highlight=%2Fusr%2Fbin%2Ffind

smartcall
13th February 2007, 19:34
Thanks!

This is the perfect solution.
Just a couple more questions:
If the user directory becomes over quota, would the site and database function properly?
I understand that the user will not be able to add files, but would the database be still operational?

Regards

till
14th February 2007, 12:57
If the user directory becomes over quota, would the site and database function properly?

Generally yes, but the umail users wont receive any new mail. But ify you run PHP with SuPHP, it might happen that PHP nis not able to make new sessions anymore, if you rum mod_php which is the default, there should be no such problem.

I understand that the user will not be able to add files, but would the database be still operational?

Yes. Because databases are stored under the user and group "mysql".

smartcall
18th February 2007, 12:57
Thanks for the answers!

I think of another solutioin which is:

Another harddisk mounted on, let's say /backup. Which directory is not in quota path, because my quota is within /var.
Backup script creates separate dirs for each web and stores the backup files in corresponding dirs.
Then makes symlinks to the existing userdirs in /var/www.


Question is: will symlink for a dir outside of quota path count for used space?

falko
19th February 2007, 15:48
Question is: will symlink for a dir outside of quota path count for used space?
I don't think so, but I'm not sure...