Command to sync/rewrite config DB to disk

Discussion in 'Installation/Configuration' started by maxxer, Oct 5, 2015.

  1. maxxer

    maxxer Member

    Hi.
    In the past I remember I used a command to fully rewrite the config DB to disk, to use in case of manual manipulation of the configuration (i.e. I happened to move all the sites from mod-fgci to php-fpm so I did it from the db). Sadly I cannot find this command anymore, neither in the forum history.
    Can anyone refresh me what this command was?
    thanks
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    mysqldump -u root -p dbispconfig > dbispconfig.sql
     
  3. maxxer

    maxxer Member

    thanks but I don't need to dump the db, I need to do the opposite: restore the DB and rewrite all the files in /etc, recreate /var/www and so on
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    mysql -u root -p dbspconfig < dbispconfig.sql to import the database-dump. Afterwards you can use the resync-tool (or your backups)
     
    maxxer likes this.
  5. maxxer

    maxxer Member

    oh great, it should be what I need, thank you very much!
    There was a command to do the same via cli, wasn't it?
     
  6. maxxer

    maxxer Member

    the restore worked, I made a resync of all options but it didn't recover databases. Just that, it worked for db users but didn't create dbs. Is it normal?
     
  7. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    I don´t know if the resync from 3.0.5.4 resyncs the databases... you can try https://git.schaal-24.de/ispconfig/resync - this is a backport from 3.1 and it should work with the current version (but you should make backups).
     
    maxxer likes this.
  8. maxxer

    maxxer Member

    didn't have the chance to try, but thank you very much anyway!
     

Share This Page