What to backup ispconfig and need to know how

Discussion in 'Installation/Configuration' started by nokia80, Dec 5, 2009.

  1. nokia80

    nokia80 Member

    hi all

    I want gladly know what there need backupt must become
    what I know are var vmail group and users
    also I gladly the codes want be possible wrap up it

    i want to move ispconfig 3 to a other server :confused:

    pleace help

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You need to backup /var/vmail, /var/www (or the place where you stored the websites), the ispconfig database, all mysql databases of the websites incl. the "mysql" database, the users and passwords in /etc/passwd and /etc/group. Make sure that you backup the directories with preserved permoissions.
  3. Thomas Jensen

    Thomas Jensen New Member

    I know this is an old thread, but; Is these directories all you need to backup, to be able to move or restore everything in ISPConfig?
    So that i can just follow the Debian Perfect Setup, restore MySQL databases, the mentioned directories, and everything would be back (I've not installed anything else than the perfect setup tells)?

    All MySQL databases
  4. finn

    finn New Member

    Just wanted to confirm whether we would need to restore
    to ensure all available sites were enabled
    for any custom email routing?

    The only reason I can think of for not restoring these directories would be if ISPConfig automagically re-writes any missing configuration files. But these directories are not mentioned in any posts I have read about backing up or restoring.

    The script posted by go0ogl3 backs up the entire /etc directory - which is clearly intended to be restored to the same server.

    So perhaps it would be useful to confirm the list above as the minimum requirement to migrate data from one server to another.
  5. falko

    falko Super Moderator ISPConfig Developer

    These directories contain just the Apache/Postfix configuration, but not any web sites/emails. Therefore you'd have to back up the web sites and emails as well.
  6. milli-pede

    milli-pede New Member

    Hi all,

    I am am very much interested in finn's question about this topic.
    I assume finn is clear on the fact that the apache config files do not represent the actual website content.
    I would like to generalise the question as I think ISPConfig is actually managing quite a few more files in /etc and its subdirectories.

    If I would restore -as mentioned here- the following files on a new system (e.g. after distro change or upgrade)

    a. /var/www (web content)
    b. /var/vmail (mail content)
    c. /etc/passwd and /etc/group (users)
    d. MySQL databases

    1. would ISPConfig then rewrite the other files it manages in /etc ?
    2. How about the order of the above, e.g. should not c. be copied first and then a. & b. while keeping owner, group and permission settings?
    3. If 1. = True, in which interval does ISPConfig do this - so how long after the database is updated until all other config files in /etc are updated?

    Looking forward to someone shedding some light into this...

    kind regards,
    Last edited: Apr 1, 2011
  7. falko

    falko Super Moderator ISPConfig Developer

    Not necessarily. ISPConfig just changes the files where you have changed something in the ISPConfig interface. Let's say you have enabled PHP for a web site, then ISPConfig will just rewrite the vhost configuration file of that web site. So if you did not restore the other vhost configuration files, then these vhost won't work. So I suggest you back up the Apache, Postfix, Courier/Dovecot, BIND configuration as well.

    Yes, it's a good idea to restore /etc/passwd and /etc/shadow first.

    ISPConfig checks for changes every minute.
  8. 8omas

    8omas Member HowtoForge Supporter

    I am also very intersted in this topic:

    So... to be more accurate (for Perfect Server Debian 6)

    We must backup:
    c. /var/www (web content)
    b. /var/vmail (mail content)
    a. /etc/passwd and /etc/group (users)
    d. MySQL databases (is it better to stop mysql and tar.gz the /var/lib/mysql?)
    e. /etc/apache2 (vhost and other ?)
    f. /etc/cron.d (sites' crons ?)
    g. /etc/bind (dns records???)
    h. /var/log (maybe for stats?)
    i /etc/postfix (is this the default or ISPConfig 'touches' it?)
    j. Anything else?
    DDArt likes this.
  9. Nolan

    Nolan Member

    Can someone verify that 8omas is correct? I'm having to do the same process.
  10. milli-pede

    milli-pede New Member

    j. /etc/courier (if applicable)
    k. /etc/dovecot (if applicable)
    l. certificates for pop3d / imapd (if applicable and not in one of the above folders)

    haven't tested any of this yet - but there wouldn't be any guarantees anyway :]

  11. jeffsss

    jeffsss New Member

    hey -i am having issues figure out the backup process
    I was wondering what to do in this case.

    / Etc / passwd (i copied this)
    / etc / shadow (i copied this)
    / etc / group (i copied this)
    / etc / sgroup (NOT FOUND)
    /etc/apache2/vhosts/Vhosts_ispconfig.conf (NOT FOUND)
    / etc / postfix / local-host-names (i copied this)
    / etc / postfix / virtusertable (i copied this)
    /etc/bind/named.conf (NOT FOUND)
    /etc/bind/pri.*(NOT FOUND)
    /etc/proftpd*.conf (NOT FOUND) guess i have pureftpd
    Generate backups of your MySQL databases (done)

    I did not stop the ftpd, httpd, or postfix before doing this.
    not sure I want to because i am afraid the server will break, it has a rootkit.
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    What I do in such a case is to create a tar.gz of these folders. You dont need all data from /etc, but I always make a complete tar.gz of it.

    a mysql dump of all databases.
    DDArt likes this.
  13. ngoyette

    ngoyette Member

    thank you for the info...

    i have the need to move only 1 of my client to a new server and than add more site for this client....

    anyways i know i can backup


    how do i extract only clientdomainX from sql to import to new server?

    So how do i export and import only 1 client?

    thank you!
  14. concept21

    concept21 Active Member HowtoForge Supporter

    What is the purpose of backing up "/var/log/ispconfig/httpd/"? :rolleyes:

    According to my understanding, we already have each client web's visitor log under website/log/ .
  15. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you do not backup /var/log/ispconfig/httpd/ you have to create the directories unter httpd manually after restoring your backup.
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The website logs are in /var/log/ispconfig/httpd/, the log directory of the website is just a bind mount to that directory.
    concept21 likes this.
  17. concept21

    concept21 Active Member HowtoForge Supporter

    I find that you should also transfer /var/lib/awstats/ which contains some awstats data. ;)
  18. Kami-Nashi

    Kami-Nashi New Member

    Just a thought, but ...

    In the case of the items in /var/www, if the www and/or log, mail/vmail, and so on were mounted NFS shares, then one would simply need to restore the database (or connection to the db server) and the configs, and add the nfs mount, correct? I'm thinking it would allow for better migration vs a lot of copying. I'm moving to a x64 env of Deb7.

    Existing ISPConfig Cluster:
    2 Web Nodes ( Debian 6 x86 )
    1 NS Node ( Debian 6 x86 )
    2 DB Nodes ( Debian 7 x86 )
    1 Mail Node ( Debian 7 x86 )

Share This Page