FeministWiki:Server setup: Difference between revisions

    Line 259: Line 259:
    === LDAP database ===
    === LDAP database ===


    Delete the existing database '''on the new server (careful!)''':
    Make sure slapd is not running and delete the existing database '''on the new server (careful!)''':


    # Run on new server!
    systemctl stop slapd
      rm /var/lib/ldap/data.mdb
      rm /var/lib/ldap/data.mdb


    Then copy over the database by running the following command from the old server:
    Then copy over the database by running the following command from the old server:


    # Run on old server
      slapcat -n 1 | ssh feministwiki.dev 'sudo -u openldap slapadd -n 1'
      slapcat -n 1 | ssh feministwiki.dev 'sudo -u openldap slapadd -n 1'


    Although there may be breaking changes that make this command fail, just as with the copying of the configuration database explained earlier, the chance is much lower for the regular "data" database, so hopefully the command will run fine.
    Start slapd again in the new server afterwards:
     
    # Run on new server
    systemctl start slapd


    === Contents of /var/www ===
    === Contents of /var/www ===