Backup

Discussion in 'General' started by smartcall, Feb 9, 2007.

  1. smartcall

    smartcall ISPConfig Developer ISPConfig Developer

    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.
     
    Last edited: Feb 9, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. smartcall

    smartcall ISPConfig Developer ISPConfig Developer

    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.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    They will fill up the disk space, so you better watch them regularly.;)
     
  5. smartcall

    smartcall ISPConfig Developer ISPConfig Developer

    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.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Yes.

    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=/usr/bin/find
     
  7. smartcall

    smartcall ISPConfig Developer ISPConfig Developer

    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
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    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.

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

    smartcall ISPConfig Developer ISPConfig Developer

    Thanks for the answers!

    I think of another solutioin which is:
    1. Another harddisk mounted on, let's say /backup. Which directory is not in quota path, because my quota is within /var.
    2. Backup script creates separate dirs for each web and stores the backup files in corresponding dirs.
    3. 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?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    I don't think so, but I'm not sure...
     

Share This Page