Tags

    Lion Wiki: Restore from SL and Lion

    Comments

    Browse in your Snow Leopard server to /Library and copy the Collaboration directory.

    Copy this to the desktop of your Lion server.

    Now start the Wiki in the Server app of the Lion server.

    Assuming eric is the user name you are logged in under:

    Execute the folowing command:

    sudo wikiadmin migrate -r /Users/eric/Desktop/Collaboration

    If you want transfer the current wiki from Lion to Lion:

    open terminal and type thefollowing lines:

    sudo -s

    PGUSER=_postgres pg_dumpall >cluster.dump

    This will dump all of your databases into a file, called "cluster.dump"

    You can find the file in yourhome directory.

    Transfer this file to your new server into the home directory.

    Download this zip file on your new server: http://sourceforge.net/projects/phppgadmin/files/phpPgAdmin%20%5Bstable%5D/phpPg Admin-5.0/phpPgAdmin-5.0.2.zip/download,unzip it, rename the folder to "phppgadmin"(this is to make it easier to browse to) and copy it into your /Library/Server/Web/Data/Sites/Default folder.

    In your server app, go to the web service and check the box next to "Enable PHP web applications".

    Open safari and browse to http://localhost/phppgadmin

    Click on PostgreSQL and that will bring up a login screen.

    Use the login name of _postgres.

    The password is your administrator password.

    You should see the following databases:

    caldav

    collab

    device_management

    postgres

    roundcubemail

    Go to the server app and turn all the services off except for the Web service (be sure that the wiki service is off as well)

    In the phppgadmin screen, click on the PostgresSQL icon on on the left pane.

    Check all the boxes next to the databases excluding the postgres database.

    In the 'Action on multiple lines" section select "drop" then Execute

    This will delete all the databases except for the "posgres" database. (don’t worry, all these databases are in the file you made and transferred to your home directory.

    After you have verified that all the databases are gone except for the postgres one, run the following lines:

    sudo -s

    PGUSER=_postgres psql -f cluster.dump template1

    This should rebuild the databases including all your data from the other server.

    There is one more step: you need to copy the /Library/Server/Wiki/FileData folder from your old server to the new one. (this contains all the attachments files on your old wiki). You might have to repair permissions after that as well.

    There may be some problems you encounter after this, as im not sure if there are any other data stores you need from your other server. KEY!! Backup before you try any of this! The best backup to use is a bootable image. Time Machine does NOT backup databases. I use SuperDuper from shirt pocket. If you use this program,make sure your external drive is partitioned using the GUID table and is bootable. Then backup “all files” using the Erase and Backup script. Be sure to test this backup, restart the server while holding down the option key. This should bring up a menu where you can select the backup drive and boot from it.Select the backup drive and hit return. If it boots up just fine, your backup is working!