PDA

View Full Version : ISPConfig3: What to backup


technoid
24th March 2009, 12:47
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

till
24th March 2009, 13:35
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.

shanz
25th March 2009, 09:33
Can these folders be configured as NAS with NFS?
how about mysql will it work properly over NFS?

till
25th March 2009, 10:49
Can these folders be configured as NAS with NFS?
how about mysql will it work properly over NFS?

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

shanz
25th March 2009, 13:01
Ok I will try this for sure.
can we change the path for mysql from /var to /usr ?

till
25th March 2009, 13:15
Ok I will try this for sure.
can we change the path for mysql from /var to /usr ?

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

technoid
29th March 2009, 17:29
You will have to backup at least the following directories:

/var/lib/mysql (this contains all user databases and the ispconfig database)


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

till
29th March 2009, 18:39
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

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

technoid
29th March 2009, 19:18
Do you recommend one way or the other as a better for recoveriing or reinstalling the database?

Thank you,
technoid

reason8
2nd July 2009, 02:29
No, then you dont have to make a binary backup of the directory.

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

till
2nd July 2009, 11:57
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.

reason8
2nd July 2009, 12:04
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.

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

till
2nd July 2009, 12:07
Yes, thats all. But make sure that you store everything with the correct petrmissions (tar pcfz ....) and before a restore, stop mysql.

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

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!

skoena
14th October 2009, 09:54
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


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.

reason8
18th October 2009, 07:37
Yes, thats all. But make sure that you store everything with the correct petrmissions (tar pcfz ....) and before a restore, stop mysql.

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!

reason8
18th October 2009, 12:46
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!

skoena
13th August 2012, 10:27
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.

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.

falko
14th August 2012, 20:13
Do you get any MySQL errors (also check /var/log/syslog)?

I'd recommend to use SQL dumps to migrate databases instead of copying the /var/lib/mysql directory. See

http://www.howtoforge.com/faq/6_3_en.html
http://www.howtoforge.com/faq/6_4_en.html

skoena
15th August 2012, 09:11
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.