backup

Discussion in 'Installation/Configuration' started by stef157, Apr 30, 2014.

  1. stef157

    stef157 Member

    Hi
    I've created a backup server who's mounted by NFS and I've edit the target backup (in ispconfig) to backup on the mounted folder.

    But… some time, the folder is not mounted (due to an ip who's variable) and after 2 days… the folder is not reachable…

    So my question is :
    1) is there a way to edit the backup routine to add the mount command ?
    2) I'll receive a second server (for backup purpose to) and I want to know if it's possible to make a backup in two folder ?

    Thanks for all !
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Hi

    For this you can make a small daemon which can check the drive status & remount if unavailable.

    You can use cron to copy back from one folder to another

    Br//
    Srijan
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    1) There is already a function implemented for this. See System > server config "Backup directory is a mount?" and "Mount command, if backup directory not mounted" in ispconfig 3.0.5.4.

    2) The backup routine is in the file /usr/local/ispconfig/server/cron_daily.php, you can add your custom code there. just ensure that you keep a copy of that file as it gets overwritten on updates.
     
  4. stef157

    stef157 Member

    Thanks for this ;-)
    I'll try it…

    Have a nice day !
     
  5. Clouseau

    Clouseau Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    backup directries are no mounts. "/usr/local/ispconfig/server/scripts/backup_dir_mount.sh" is a command that is executed before the backup starts, so that is not a script from ispconfig, it is an option to allow you to write a script in case that you programmed your own custom backup system.
     
  7. Clouseau

    Clouseau Member

    So that option is for enabling my custom backup script which I put in this file /usr/local/ispconfig/server/scripts/backup_dir_mount.sh

    All the best in new year btw :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This script i run before a ispconfig backup starts. you use that e.g. when you have a external nfs server for backups which is not permanently mounted or if you use sshfs or ftpfs with fuse to ensure that the directory where backups are saved is mounted.
     
  9. Clouseau

    Clouseau Member

    So that option toggles the use of /usr/local/ispconfig/server/scripts/backup_dir_mount.sh script? If yes, maybe it should be named differnetly ie. "Use custom mount dir script located in /usr/local/ispconfig/server/scripts/backup_dir_mount.sh"
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The option lets ispconfig know that the backup directory is a mount point. So it does exactly what its current name says. The a script with the name /usr/local/ispconfig/server/scripts/backup_dir_mount.sh is called is just one sub function of the overall process.
     
  11. Clouseau

    Clouseau Member

    Sorry for nagging, so basically ispconfig reads /etc/fstab entry, checks if the mount point is mounted and mounts it if it is not, then calls /usr/local/ispconfig/server/scripts/backup_dir_mount.sh if it exists and then does his own backing up of homedirs and mysql databases per website config of backup interval(1 to 10...) to /var/backups. Just want to be clear on that. Is that written in some documentation, maybe in the manual?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig need to know if the directory is a mointpoint where the backups are stored, the chcekbox exists for this reason as a temporary mountpint is not defined in fstab, so it makes no sense to try to read that file. Please see cron_dialy.php and the backup plugin if you like to know the exact code that is executed for backups and how this code interferes with settings from the interface.
     
  13. Clouseau

    Clouseau Member

    OK, will do. Tnx :)
     

Share This Page