SiteDump

Summary: creates a .tar.gz file of the complete site for download
Version: 2017-06-01
Prerequisites: PmWiki-2.2
Status: stable
Maintainer: bhoc
License: GPL
Users: (view? / edit)
Discussion: SiteDump-Talk?

Questions answered by this recipe

How can I download a complete site for archiving or copying over to a test system?

Description

This recipe will add an action (?action=dump) which will trigger a download of a Backup-$WikiTitle-<timestamp>.tar.gz file.
It will obviously only work with *X systems that allow passthru("tar ...") function calls.

Installation

Copy sitedump.phpΔ into your cookbook folder and add include_once("cookbook/sitedump.php"); to your config.php

Configuration

(no configuration required)

Usage

On any arbitrary page, issue $pagename?action=dump and save the .tar.gz file in the subsequent file download dialog.
You can also add an entry to Site/PageActions like * %item rel=nofollow%[[{*$FullName}?action=dump | Backup ]]

Notes

To avoid unauthorized use, the recipe requires admin access on SiteAdmin/SiteAdmin. If the required authorization level is not met, the page is simply reloaded without a password prompt. So no unauthorized person will be able to guess if the ?action=dump is implemented or not.

Release Notes

  • 2017-06-01 Initial version

See Also

Cookbook /
BackupHTMLZip  Export your wiki to static HTML then optionally compress/zip it (Experimental)
BackupPages  Automatically back up the wiki.d directory to a .zip file
BackupWithRsync  How to backup a PmWiki installation with the program `rsync`. (abandoned)
PrintGroup  Export WikiGroup pages to one large HTML file, and/or to PDF (Experimental)
ZipExport  Export the content of PmWiki-formatted page files in a zip archive (Beta)
PmWiki /
BackupAndRestore  background information and some basic backup and restore procedures

Contributors

bhoc

Comments

See discussion at SiteDump-Talk?

In order to make the recipe truly portable across systems, you may want to expand the passthru("tar -czf - *"); call into something more elaborate as described in http://www.binarytides.com/how-to-create-tar-archives-in-php/.

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.