I like my new blog, the theme is minimal, writing a new post is easy ( thanks to fine folks at Wordpress)
As an ops guy, the day I started blogging, I also thought about backup 😉
While Wordpress gives you import/export XML feature, I wanted a backup which is platform independent.
Here is the simplest ever command you can ever to backup your complete blog ( of-course this is not limited to Wordpress)
wget -Nrkpl 0 <your blog>
eg: wget -Nrkpl 0 https://opstribe.wordpress.com/ (this will create a directory with name opstribe.wordpress.com and download all the contents under it)
The best part about this command is that it also gives you a local copy of the blog.
So basically the backup can also be used to locally view your blog (open index.html) or share your blog.
-N Turn on time-stamping
-r Turn on recursive retrieving
-k After the download is complete, convert the links in the document to make them suitable for local viewing
-p This option causes Wget to download all the files that are necessary to properly display a given HTML page
-l 0 Specify recursion maximum depth level depth(0=infinite)
If want to further simplify, please replace -Nrl 0 with -m(–mirror) (-m is equivalent to -r -N -l inf –no-remove-listing).
So, wget -mkp https://opstribe.wordpress.com/ works too.
If you like to have a daily/weekly/monthly backup, you may use cron job (*nix systems) to schedule your backup.
What’s your backup method?