Mirror a Confluence Site

Posted by in IT, Tutorial

TL;DR: wget has a mode capable of saving cookies.

The other day I thought it’d be interesting to have a local copy of a confluence wiki, to avoid hitting the internet every time I needed a howto. So, I’ve tried curl first and failed (probably my fault really). So, after a few tries, I managed to get a workflow in place.

First, we need to log in onto the site:

Here, you need to replace the user name and password with something meaningful. Please note that text must be escaped with something like this encoder.

The command will create a file cookies.txt which will contain the session cookie. Now, all you need to do is to mirror the site:

..and presto! you have the site mirrored locally!

HTH,


A little experiment: If you find this post and ad below useful, please check the ad out :-)