How to restore from hardware failure

Discussion in 'ISPConfig 3 Priority Support' started by DantePasquale, Nov 1, 2019.

  1. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Hi All,
    Yes, once again a server has died and I'm going to move this to Linode for now, until I can get it replaced :(
    I have fairly recent backups of ISPConfig but what is the best way to go about this?
    1. Install OS Instance and create same users and volumes
    2. Follow instructions for installation of ISPConfig and its required packages
    3. Now, do I restore from the backup or do I recreate pretty much from Scratch??? I really just need email to work for now, the websites can wait.
    Here's what I see in the backups folder - it's a few days old as is the vmail folder, but that's OK for me:

    drwx------ 2 root root 4096 Oct 2 23:14 .
    drwxr-x--- 20 root root 4096 Oct 2 23:14 ..
    -rwx------ 1 root root 7861731 Oct 2 23:14 etc.tar.gz
    -rwx------ 1 root root 1073215 Oct 2 23:14 ispconfig_db_backup.sql
    -rwx------ 1 root root 38781497 Oct 2 23:14 ispconfig_software.tar.gz​

    I have this backup of mysql but I don't think it's very helpful:
    -rw-rw---- 1 rtkit saned 50331648 Oct 26 03:10 ib_logfile1
    -rw-rw---- 1 rtkit saned 18874368 Oct 26 03:10 ibdata1
    -rw-rw---- 1 rtkit saned 50331648 Oct 26 03:10 ib_logfile0
    drwx------ 2 rtkit saned 4096 Oct 26 03:15 c2_piwigo
    drwx------ 2 rtkit saned 4096 Oct 26 03:15 c2_wp
    drwx------ 2 rtkit saned 12288 Oct 26 03:15 dbispconfig​
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I would do it li8ke this:

    1) install ISPConfig as usual.
    2) Copy the web* users and client* groups back by using the backup files in the etc.tar.gz backup, but only the users and groups, not the whole files. the files that need to be edited are /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow
    3) Restore the dbispconfig database from backup.
    4) use Tools > resync in ispconfig, select all checkboxes and let ispconfig recreate the missing config files.
    5) Restore /var/vmail and /var/www

    There ares everal threads about moving an ispconfig installation to a new server, these contain also the information thats needed for such a restore.
     
  3. DantePasquale

    DantePasquale Member HowtoForge Supporter

    I had to use the --force for restoring the dbispconfig database but at least emails are working for now! Mailfilters don't seem to be working, but I may just disable for now
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to run Tools > resync again, this should recreate the mail filters. But normally the filters should have been part of your /var/vmail backup as they are just files.
     
  5. DantePasquale

    DantePasquale Member HowtoForge Supporter

    I should have been more clear, the filters are there but I don't think the folders are, or are no longer subscribed. For example, I have one for ebay.com that puts it into the INBOX.Ebay folder, but I don't see that folder in Thunderbird.

    It's not a big issue and I'll look into it later. Thanks for the help to get the email server up and running ;)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The subscriptions are also file based and part of the maildir structure if I remember correctly, so they should be there as well.
     
  7. DantePasquale

    DantePasquale Member HowtoForge Supporter

    The subscriptions were there but for some reason Thunderbird didn't use it??? I just had to re-establish the subscription from there.
    New Issue: I can't access webmail - I get the following error from this url: https://TLD/:8081/squirrelmail/
    CONFIGURATION ERROR
    config.inc.php was not found.
    Please read the INSTALL instructions!​

    Not sure what I missed

    Do I need to configure config.inc.php.sample or just rename it?

    [email protected]:~# file /usr/share/squirrelmail​
    /usr/share/squirrelmail: symbolic link to /usr/share/roundcube
    [email protected]:~# locate config.inc.php
    [email protected]:~# ls -l /usr/share/roundcube/
    total 48
    drwxr-xr-x 2 root root 4096 Nov 2 12:24 bin
    -rw-r--r-- 1 root root 996 Apr 14 2018 composer.json
    -rw-r--r-- 1 root root 3848 Apr 14 2018 config.inc.php.sample
    -rw-r--r-- 1 root root 12726 Apr 11 2018 index.php
    drwxr-xr-x 3 root root 4096 Nov 2 12:24 installer
    drwxr-xr-x 29 root root 4096 Nov 2 12:24 plugins
    drwxr-xr-x 8 root root 4096 Nov 2 12:24 program
    drwxr-xr-x 4 root root 4096 Nov 2 12:24 skins
    drwxr-xr-x 7 root root 4096 Nov 2 12:24 SQL
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Which tutorial did you use for the installation?
     
  9. DantePasquale

    DantePasquale Member HowtoForge Supporter

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try to run these commands as root:

    Code:
    chown root:ispapps /etc/roundcube/debian-db.php
    chmod 640 /etc/roundcube/debian-db.php
    chown root:ispapps /etc/roundcube/config.inc.php
    chmod 640 /etc/roundcube/config.inc.php
    chown -R ispapps:adm /var/log/roundcube
    chmod -R 750 /var/log/roundcube
    chown -R ispapps:ispapps /var/lib/roundcube/temp
    chmod -R 750 /var/lib/roundcube/temp
     
  11. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Thanks, that did the trick! I bet it got messed up when I restored some items from backups.
     
  12. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Ok, I finally have new server up and running! I have installed ISPConfig but it's got no data (I didn't create anything).
    So, how best to move it off the cloud and back onto my own server? Isn't there a tool that I can purchase for this? Thanks!

    ---OR, maybe I'll leave just the email on the cloud server and have my own server be webserver -- Can you point me to info on how to do that?
     
    Last edited: Dec 4, 2019 at 4:00 AM
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    The easiest way is probably to use the Migration Tool: https://www.howtoforge.com/tutorial...-confixx-plesk-to-ispconfig-31-single-server/
    You can use the tool also to migrate only parts like leaving mail on the cloud server, see chapter advanced options of the tutorial. The tool has a dry run mode and creates a migrate.log file which shows in detail what will be migrated, so you can try it out even before you buy a license in dry run mode and see in the log what get's migrated when using advanced options like:

    ./migrate --exclude-mail

    to migrate everything except the mail part to your new server.
     
  14. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Migration looks like it starts out OK but then then says Job Failed. Stopping Sync! after an ssh_exchange_identification message:

    I see it's complaining about source file does not exist and, it does NOT exist.
    ls -l /var/www/clients/client0
    total 8
    lrwxrwxrwx 1 root root 30 Nov 25 21:00 cocoanet.us -> /var/www/clients/client0/web1/
    drwxr-xr-x 19 root root 4096 Nov 2 20:02 web1
    drwxr-xr-x 9 root root 4096 Nov 25 21:00 web1_bak_2019_11_26_02_00_05





    [INFO] Target ISPConfig job queue has completed. Continuing.

    [INFO] Skipping system server as we have no job entries for this target.
    [3/57] Syncing /var/www/clients/client0/web1/web to /var/www/clients/client0/web1/
    0 100% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/3)
    [4/57] Syncing /var/www/clients/client0/web1/private/ to /var/www/clients/client0/web1/private/
    0 100% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/1)
    [5/57] Syncing /var/www/clients/client0/web1/home/ to /var/www/clients/client0/web1/home/
    0 0% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/10)
    [6/57] Syncing /var/www/clients/client0/web1/ssl/ to /var/www/clients/client0/web1/ssl/
    0 100% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/1)
    [7/57] Syncing /var/www/clients/client0/web1/cgi-bin to /var/www/clients/client0/web1/
    0 100% 0.00kB/s 0:00:00 (xfr#0, to-chk=0/1)
    [WARN] Source dir/file /var/www/clients/client0/web4/web for web server does not exist. Skipping sync job.
    [WARN] Source dir/file /var/www/clients/client0/web4/private/ for web server does not exist. Skipping sync job.
    [WARN] Source dir/file /var/www/clients/client0/web4/cgi-bin for web server does not exist. Skipping sync job.
    [INFO] Skipping mail server as we have no job entries for this target.in /var/www/clients
    ssh_exchange_identification: Connection closed by remote host
    [ERROR] job failed. Stopping Sync!



    =============
    Migration tool run completed.
     

Share This Page