List of directories needed to move ISPConfig 2

Discussion in 'General' started by PermaNoob, Mar 4, 2009.

  1. PermaNoob

    PermaNoob Member

    Could someone make a list of the directories I need to backup to move ISPConfig to a new server?

    I'm using ISPConfig 2 on Debian Etch

    I'm using Duplicity to backup, and so far I have:

    /root/ispconfig
    /home/admispconfig
    /var/www

    and the mysql databases

    I saw the thread about moving ISPConfig, but it's several years old and I don't have many of the directories mentioned.

    Thanks in advance!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. PermaNoob

    PermaNoob Member

    That's the thread I was referring to.

    I don't have a /home/www/, and I thought I was missing some of the others so it appeared to be outdated.

    So here's the list I have--is this all that's needed?

    ---------------------

    /etc/passwd
    /etc/shadow
    /etc/group

    Vhosts_ispconfig.conf

    /etc/postfix/local-host-names
    /etc/postfix/virtusertable

    named.conf

    the .conf files in /etc/proftpd/

    all the pri.* zone files for domains that use the local dns

    /var/www/

    sql dumps of the MySQL databases

    ---------------

    What about

    /root/ispconfig/
    /home/admispconfig/

    Would it be useful to have them or do they contain nothing that the new installation won't have?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    If you first install ISPConfig on the new server, these directories are already there.
     
  5. PermaNoob

    PermaNoob Member

    OK, thanks for the help. I'm just trying to prepare for a disaster, in which case I would either restore my server with a new installation or order a new server and install there, which I think will be easier than trying to restore my old installation.

    So I've got these series of commands which I execute in a single file for backing up:

    cp /etc/passwd /disk2/backup1/ispconfigfiles
    cp /etc/shadow /disk2/backup1/ispconfigfiles
    cp /etc/group /disk2/backup1/ispconfigfiles
    cp /etc/apache2/vhosts/Vhosts_ispconfig.conf /disk2/backup1/ispconfigfiles
    cp /etc/postfix/local-host-names /disk2/backup1/ispconfigfiles
    cp /etc/postfix/virtusertable /disk2/backup1/ispconfigfiles
    cp /var/lib/named/etc/bind/named.conf /disk2/backup1/ispconfigfiles
    cp /etc/proftpd/modules.conf /disk2/backup1/ispconfigfiles
    cp /etc/proftpd/proftpd.conf /disk2/backup1/ispconfigfiles
    duplicity --no-encryption /var/www file:///disk2/backup1/allsitesbackup

    plus the MySQL databases (I'm using the Web Backup in ISPConfig for the 10 or so databases on my server--is there a reason I shouldn't do this?)

    and all the pri.* zone files for domains that use the local dns.

    Did I miss something?
     
    Last edited: Mar 4, 2009
  6. falko

    falko Super Moderator Howtoforge Staff

    I'd also copy /etc/proftpd/proftpd_ispcponfig.conf, but the rest looks good.
     
  7. PermaNoob

    PermaNoob Member

    I don't have that file anywhere on my server--is that something I should be concerned about?

    These are the only 2 files I have in that directory:

    /etc/proftpd/modules.conf
    /etc/proftpd/proftpd.conf

    nvm--I copied and pasted yours and just saw the typo, it's at /etc/proftpd_ispconfig.conf

    thanks for the help
     
    Last edited: Mar 6, 2009
  8. PermaNoob

    PermaNoob Member

    In conclusion, for other noobs using ISPConfig 2, this is my list for what needs to be backed up for a move to a new installation:

    cp /etc/passwd /disk2/backup1/ispconfigfiles
    cp /etc/shadow /disk2/backup1/ispconfigfiles
    cp /etc/group /disk2/backup1/ispconfigfiles
    cp /etc/apache2/vhosts/Vhosts_ispconfig.conf /disk2/backup1/ispconfigfiles
    cp /etc/postfix/local-host-names /disk2/backup1/ispconfigfiles
    cp /etc/postfix/virtusertable /disk2/backup1/ispconfigfiles
    cp /var/lib/named/etc/bind/named.conf /disk2/backup1/ispconfigfiles
    cp /etc/proftpd/modules.conf /disk2/backup1/ispconfigfiles
    cp /etc/proftpd/proftpd.conf /disk2/backup1/ispconfigfiles
    cp /etc/proftpd_ispconfig.conf /disk2/backup1/ispconfigfiles
    duplicity --no-encryption /var/www file:///disk2/backup1/allsitesbackup

    plus the MySQL databases

    and all the pri.* zone files for domains that use the local dns.

    I use duplicity because it compresses the www files so they have proper ownership/permissions/location when extracted and it only backs up changes after the first backup, so it's very fast.

    I use cp for the other files because root owns them all

    You can also use duplicity to ftp the backup, like:

    FTP_PASSWORD=yourpassword duplicity /var/www ftp://user@serveriporaddress/

    with encryption for security--duplicity will ask for a passphrase unless you specify --no-encryption

    You can modify the list for your backup location and save it as a text file called yourbackupfile, for example, on your server and made executable by chmod to 755, then you can execute it with ./yourbackupfile
     
    Last edited: Mar 6, 2009

Share This Page