Restore from scratch and DB

Discussion in 'Installation/Configuration' started by omgs, Apr 11, 2015.

  1. omgs

    omgs New Member

    Hi.

    I had several vps with openvz and ISPconfig 3. I had web, mail, dns, db and web configs under debian 6. The server disk crashed, the vps system backups failed (that's another issue) but I kept the vps config, most of the data and the DBs backups safe.

    I have installed everything from scratch and using latest debian wheezy and the VPS. I have a dedicated mysql host (not integrated in the previous ispconfig) where I have restored all dbs, including ispconfig. I've also recreated the vps from the config files (network, resources, etc) but completely new OS. So, the master server would be the mysql server (of course, I've followed the tutorial and granted the hosts to access the db and host).

    Then, using the same old installer, I've used the setup for master and slaves, with some problems and relative sucess. Why relative? Well, I assigned the corresponding roles to each host, and when running the setup in expert mode, I always set the local db in localhost, and join to the mysql host as master. By doing this, the master db was being ignored (accesing via the web I could only see itself, not all servers). I wonder how every slave by using its own "copy" ignores the master. Anyway, I did some test by trying to create (in fact I try to restore the data in all DNS zones) some records and zones, but nothing hapenned. I tried to restore the db backup in all hosts, but I couldn't see any change in /etc/bind. This is my second problem.

    My first problem is the web server. I have all the data and many websites. I can see the sites via ispconfig, but I wonder the way to recreate them at the system. I guess that I have to create manually the clients with their UIDs, but I don't know how could I recreate the apache config for each site, since I thing there were suexec declarations (maybe another things) that, if I go too far trying to reacreating all on my own, ispconfig could become useless or "out of sync". So, the final background is to restore the previous situation and ispconfig fully functional.


    Thanks in advance.
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You can create the folders for web with the resync-tool.
     
  3. omgs

    omgs New Member

    Can you please explain better?
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Toos -> Resync
     
  5. omgs

    omgs New Member

    Sorry, there's no such option under "Tools"
     
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you are logged in as admin, you can see "sync tools" on the tools-tab.
     
  7. omgs

    omgs New Member

    I'm logged as admin and that option doesn't exist in my installation. Maybe I should have specified the exact version of ispconfig, 3.0.3.3, that might be the reason. Anyway, I've been unable to find documentation about my specific situation, not only about the web server, for any extra things that I should do and have overlooked.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The resync toold does not exist in that very old version that you have installed.

    What do you mean with this? In a multiservers etup, the slaves dont have a web interface, if you would install a web interface on a slave and login there, then this would cause a conflict with the mastre and the slave will get disconnected if you added any data in the slave interface. So what did you access by web, the master? If the slaves dont show up in the server list of the master, then they are not connected at all.
     
  9. omgs

    omgs New Member

    Of course the only web access via the "ispconfig server", but I don't intend this server to be the master (for the db), since I have a specific db server with non-public ip address. What I mean is that when installing the ispconfig server and joining the db server (with the restored backup with several servers), ispconfig doesn't show the previous servers, just itself. If I restore the db backup on this server (i.e. overwriting the initial setup), only then I'm able to see via web the existing data.
    I've had to guess this method, and I wonder if for this version, there's something I can/should do, which is not clear to me in the situation of disaster recovery.

    I also wonder if it's possible if I set all hosts without joining, and after setup (and overwriting every local db with the backup, so they all have the same data) I edit the config file and just set the local master data. I even wonder if I edit and instead of the local db, I just point to the master db. I haven't been able to find someone in this situation by searching this forum, but if this situation is solved and/or documented somewhere, please let me know.


    TIA
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally you just estore the old setup for a disaster recovery, but you seem to have lost that?

    Thats possible. You will have to edit the /usr/local/ispconfig/server/lib/config.inc.php file and set the correct master login data and also the correct server_id there. thn you have to restore the dbispconfig DB of this slave from your backup and afterwatds run a ispconfig update by downloading the ispconfig tar.gz, unpacking it and running updat.php. you have to choose to reconfigure services during update.
     
  11. omgs

    omgs New Member

    First of all, thanks for your reply.
    What's exactly "the old setup"? I lost everything except the db and web data (not config).
    Then, what's the most reliable way to find out the server_id for each server? I guess that some of the problems may be because there isn't the right correspondence for each server, and I also wonder how to reassign the right server_id to each server.
    I also wonder: should (or can) each server have the *exact same db data* in its local db? If so, then I don't know why so many dbs are necessary, which of course shows that I'm not too used to ispconfig. With this, I'm trying to make you understand my situation, so you can help better, even trying to go back in whatever I can have done wrong on the way to restore the situation previous to the hard disk failure.
    And one thing I've tried to preserve is the old version vs the newest version, just to make sure that any changes in the latest version are compatible with the data. Of course, when I get everything properly back, then I'd like to upgrade to the latest version. I hope this post helps you to understand everything better.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    take a look into the server tabe of the database, it has a column server_id.

    It can have the same data but it should not have the same data. A node shall have only the data that it needs, so if one node gets hacked then the hacker has only access to this data.

    Reliability and scalability. Each node in a ispconfig is independant from ecah other node, so you can shutdown the master and you can shutdown other nodes without affecting a server. If you wold have just a single db, then all nodes will fails when there is a problem in the single db node. Beside that its a question or reliability, a single mysql instance can only handle a certain amount of connections, so if you have a setup with many servers then this can easily overload a single db.
     
  13. omgs

    omgs New Member

    Well, I think I've followed the steps you've mentioned. I fixed the connection errors that the ispconfig log was showing. I also found the server_id for each host in the "server" table and set it in /usr/local/ispconfig/server/lib/config.inc.php (also in interface/lib/config.inc.php). I also dumped the backup, so all dbs have the same data. I set the ispcsrvX users so they could access remotely from each host. I can't think of anything else at this time. So, once supposedly reached a "good status" but without being useful, I' proceeded to upgrade, so I've downloaded and performed the update on every server, and there have been no problems, so I'm now at 3.0.5.4p5.
    I've found the resync option, and I've tried only the dns option, without errors, but can't find any change. I use bind for DNS, and I've found that the setting (at least for me) about how to set up the DNS software is confusing, because the initial setting is for myDNS. I've tried to set "bind", but when trying to resync, I'm still at the same point. I haven't tried manually even to create a new zone, but there aren't any changes under /etc/bind and the log says nothing. What do you think is happening?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page