sys_datalog table

Discussion in 'Installation/Configuration' started by tom123, Jul 23, 2014.

  1. tom123

    tom123 Member

    Can somebody tell me if, in a standard multiserver installation of ispconfig, the sys_datalog table has some entry set with server_id = 0 so that any of these entries would be copied on every newly installed server?

    I have more or less 8000 entries with server_id = 0, this because i did a wrong customization to ispconfig code and every database,site,email and so on was created with server_id = 0 and thus replicated on each server.

    I would like to remove all of these entry, can I safely remove everything ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats correct. ID = 0 is the global replication identifier. Some changes have to be replicated to all servers, e.g. client changes and these have ID 0.

    You can remove them by deleting them. But dont purge the table as this will reset the ID counter and slaves will stop replicating.
     
  3. tom123

    tom123 Member

    I don't want to purge the whole table but just remove items with server_id = 0
    Could you tell me if a standard installation (with two or more client servers configures) has some entries and which entries?

    I would like to restore it back by removing everything not needed with server_id =0
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    From my post above:

    "Some changes have to be replicated to all servers, e.g. client changes and these have ID 0."

    ID 0 is used by for clients, web_database and web_database_user
     
  5. tom123

    tom123 Member

    Why web_database and web_database_users needs to be replicated on every server ?

    Any other thing that should be replicated everywhere ?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    When you add a database user, then this user might be used on any server to create a database. thats why every instance must be aware of the existance of this user. I'am not sure if databases get replicated to all servers as well, but you can look this up in the ispconfig sources.
     
  7. tom123

    tom123 Member

    Actually my sys_datalog has these entries (for server_id = 0):

    Code:
    9;client
    1;domain
    1;openvz_template
    3;remote_user
    33;spamfilter_policy
    19;sys_group
    19;sys_ini
    
    
    the number is the number of entries for that kind of table

    For example, is ok that spamfilter_policy is replicated on each server (having server_id=0?).
    What about sys_group, sys_init and remote_user?

    I've made some customization to ispconfig code so I'm unable (in a easy way) to double check if stock ispconfig add items with server_id = 0 or if server_id = 0 was added by a wrong mine customization
     
    Last edited: Jul 25, 2014
  8. tom123

    tom123 Member

    Any help on this ?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I cant tell you without checking the code of all forms which form uses which value for the fields in sys_atalog. If you like to know in detail which form sets which values in sys_datalog, then you can e.g. install a stock version of ispconfig ina virtual machine and test it.
     
  10. tom123

    tom123 Member

    Could yoi point me to the code that add entries in sys_datalog tables so that I can check who is saving server_id as "0"
     

Share This Page