backup page using ?action=backup

Documentation is at

The backup_pmwiki.txt script (rename it to php) adds an “?action=backup” which can be used to backup all the useful directories (and subdirectories). You can configure the directory where to place backups, set up the backup format and if you want, at the end of creation of backup file, show a link to download it. This script is inspired from BackupPages, but saves all directories mentioned at BackupAndRestore (and not only wiki.d). It also fixes several bugs mentioned at BackupPages. Backup directory might be created by hand and given 777 rights. The variable redefining the backup directory can be set before the script inclusion, as well as other parameters (see script). It is better that this script is set only for a dedicated page, and so, the include set in a file associated to this page like


This file may content something like :

 <?php if (!defined(‘PmWiki’)) exit();
 $BackupDir = mybackupdirectory;   defaults to
 // other parameters : see backup_pmwiki.php

Restrictions This backup page can be read protected though ?action=backup is still possible on a read protected page. A cryptic name for the page and directory can help protection, or back_pmwiki.php can be edited to use an action name different from backup. Anyone can download the backup archive file if they know or can guess its URL.

See also BackupPages (original script) Modified BackupPages script, adds ability to e-mail backup archive BackupAndRestore RestorePmWiki

Page last modified on 24 April 2014