Skip navigation
This discussion is archived

How can I reset/wipe/delete all my wiki content?

4508 Views 3 Replies Latest reply: Apr 22, 2012 7:15 AM by Steven Bytnar RSS
jmacalister Calculating status...
Currently Being Moderated
Feb 12, 2012 3:04 AM

I would like to start my Wiki again from emply blank content without having to reinstall the entire lion server.

Mac mini, Mac OS X (10.7.3), Lion Server
  • Xavier Laville Calculating status...

    Here is a set of TERMINAL commands that will reset our Mac OSX Lion Server Wiki. Take care, all posts will be deleted. You will restart with a clean wiki database:


    sudo serveradmin stop postgres

    sudo mv /var/pgsql /var/pgsqlold

    sudo mkdir /var/pgsql

    sudo chmod 700 /var/pgsql

    sudo chown _postgres:_postgres /var/pgsql

    sudo /System/Library/ServerSetup/CleanInstallExtras/01_PostgreSQLSetup.rb

    sudo serveradmin fullstatus postgres

    sudo serveradmin start postgres

  • Steven Bytnar Calculating status...

    Those terminal commands will wipe out all of the databases, not just the Wiki.

    bash-3.2# psql -l -U _postgres

                                        List of databases

           Name        |   Owner    | Encoding | Collation | Ctype |    Access privileges   


    caldav            | caldav     | UTF8     | C         | C     |

    collab            | collab     | UTF8     | C         | C     |

    device_management | _devicemgr | UTF8     | C         | C     |

    postgres          | _postgres  | UTF8     | C         | C     |

    roundcubemail     | roundcube  | UTF8     | C         | C     |

    template0         | _postgres  | UTF8     | C         | C     | =c/_postgres           +

                       |            |          |           |       | _postgres=CTc/_postgres

    template1         | _postgres  | UTF8     | C         | C     | =c/_postgres           +

                       |            |          |           |       | _postgres=CTc/_postgres

    (7 rows)


    Warning: I haven't tried this, but doing something like this might reset only the Wiki:

    sudo -s

    serveradmin wiki stop

    /usr/bin/dropdb collab


    serveradmin wiki start


More Like This

  • Retrieving data ...

Bookmarked By (1)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.