ISPConfig3: What to backup

Discussion in 'General' started by technoid, Mar 24, 2009.

  1. technoid

    technoid New Member

    What are the directories/files that need to be backed up on an ISPConfig3 installation. The documentation I have found so far has been for ISPConfig2, so the paths are a bit different.

    I would like to backup the user's data also such as websites and email.

    I don't want to miss a file or directory and then need it later on.

    Thank you,
    technoid
     
  2. till

    till Super Moderator

    You will have to backup at least the following directories:

    /var/lib/mysql (this contains all user databases and the ispconfig database)
    /var/www (or were your website docroot is)
    /var/vmail (email)
    /etc (other configuration data and the system users)

    ISPConfig itself resides in /usr/local/ispconfig, you might backup that too but the other directories should be sufficient to restore a setup.
     
  3. shanz

    shanz New Member

    Can these folders be configured as NAS with NFS?
    how about mysql will it work properly over NFS?
     
  4. till

    till Super Moderator

    I dont know. I guess you will have to try it.
     
  5. shanz

    shanz New Member

    Ok I will try this for sure.
    can we change the path for mysql from /var to /usr ?
     
  6. till

    till Super Moderator

    No, this can not be changed and it dos not make sense to me to change the data directory from mysql to /usr.
     
  7. technoid

    technoid New Member

    Do I need to backup this directory if I have dumped the database via a "mysqldump --user=root --password=xxxxxx --lock-all-tables --all-databases > backup.sql"?

    Thank you,
    technoid
     
  8. till

    till Super Moderator

    No, then you dont have to make a binary backup of the directory.
     
  9. technoid

    technoid New Member

    Do you recommend one way or the other as a better for recoveriing or reinstalling the database?

    Thank you,
    technoid
     
  10. reason8

    reason8 New Member

    So there is no need to perform a dump if the directory /var/lib/mysql is backed up via a tarbal archive?
     
  11. till

    till Super Moderator

    The directory /var/lib/mysql contains all data of all mysql databases on your system. If you stop mysql before you make a tar.gz of this directory you will get a consisten backup of your databases.
     
  12. reason8

    reason8 New Member

    And then I simply unarchive the files back over to their appropriate directories, relaunch ISP3 and its ready to go?
     
  13. till

    till Super Moderator

    Yes, thats all. But make sure that you store everything with the correct petrmissions (tar pcfz ....) and before a restore, stop mysql.
     
  14. reason8

    reason8 New Member

    Do you have to install ISPConfig3 prior to restoring the backup files on a fresh, newly wiped drive?

    I just purchased a new hard drive that I want to put ISPConfig3 on. Same operating system and configuration as before but newer (bigger) drive with a different drive for swap.

    Thanks!
     
  15. skoena

    skoena Member


    Look at this post from Franz: http://www.howtoforge.com/forums/showthread.php?t=38258

    It is a backup script that backups the databases and the folders (see the lista.txt from the script).
    You can backup remote to another server or to an mouted network drive. (or to a local folder)

    Rudolf.
     
    Last edited: Oct 14, 2009
  16. reason8

    reason8 New Member

    Ok. I backed up the live server and restored everything onto the second server. Everything will be the same (IP addresses) but for some reason, the new server is having a problem (I believe) with the /sites-available/ and /sites-enabled/ directories. I restored these files from the live server and extracted them to the second but apache will not load. It gives me an error (startproc: exit status of parent of /usr/sbin/httpd2-prefork:1) failed. When I delete the files (all .vhost and .conf files) apache loads but obviously no sites loads.

    Am I missing something? I know that there are symlinks from sites-available to sites-enabled but its just not working for me.

    Thanks!
     
  17. reason8

    reason8 New Member

    Ok. I backed up the live server and restored everything onto the second server. Everything will be the same (IP addresses) but for some reason, the new server is having a problem (I believe) with the /sites-available/ and /sites-enabled/ directories. I restored these files from the live server and extracted them to the second but apache will not load. It gives me an error (startproc: exit status of parent of /usr/sbin/httpd2-prefork:1) failed. When I delete the files (all .vhost and .conf files) apache loads but obviously no sites loads.

    Am I missing something? I know that there are symlinks from sites-available to sites-enabled but its just not working for me.

    Thanks!

    *UPDATE*

    I was able to resolve the above issue by copying over the log files from /var/log/ispconfig/httpd/*site name* to the corresponding directory on the new drive but now I am getting the following error when trying to load the site:

    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Warning: Call-time pass-by-reference has been deprecated in /usr/local/ispconf
    ig/interface/web/monitor/show_sys_state.php on line 140, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Warning: Call-time pass-by-reference has been deprecated in /usr/local/ispconf
    ig/interface/web/monitor/show_sys_state.php on line 140, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined index: unknown in /usr/local/ispconfig/interface/web/monito
    r/show_sys_state.php on line 149, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined index: info in /usr/local/ispconfig/interface/web/monitor/s
    how_sys_state.php on line 150, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined index: warning in /usr/local/ispconfig/interface/web/monito
    r/show_sys_state.php on line 151, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined index: critical in /usr/local/ispconfig/interface/web/monit
    or/show_sys_state.php on line 152, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined index: error in /usr/local/ispconfig/interface/web/monitor/
    show_sys_state.php on line 153, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:06:53 2009] [error] [client 192.168.1.10] PHP Notice: Undefined variable: description in /usr/local/ispconfig/interface/web/
    monitor/show_sys_state.php on line 73, referer: http://xxx.xxx.x.x:8080/index.php
    [Sun Oct 18 02:25:02 2009] [error] [client 192.168.1.10] PHP Notice: Undefined variable: wb in /usr/local/ispconfig/interface/lib/app.inc.p
    hp on line 176, referer: http://xxx.xxx.x.x:8080/index.php

    I do not know what directories I am supposed to back up. I was told the www, mysql, ispconfig and etc as per http://www.howtoforge.com/forums/showthread.php?t=32789

    I am lost at this point. Could someone please help? :(

    Thanks!
     
  18. skoena

    skoena Member

    I used rsync to copy /var/lib/mysql to my new server. But the databases are not available yet when I open ispconfig? I rebooted after the rsync.
     
  19. falko

    falko Super Moderator

  20. skoena

    skoena Member

    Falko,
    I did backup the /var/lib/mysql directory because it was mentioned in this thread:

    http://www.howtoforge.com/forums/showthread.php?t=32789

    I really would like to suggest to make a sticky or howto how to backup a server running ispconfig and restoring it to a new server.
     

Share This Page