|
Cookbook /
BackupPagesSummary: Automatically back up the wiki.d directory to a .zip file
Version:
Prerequisites:
Status:
Maintainer:
Discussion: BackupPages-Talk
Categories: Administration
Questions answered by this recipeQuestionIs there an easy way to automatically back up the wiki.d directory to a .zip file? AnswerThe backup_pages.phpΔ script adds an "?action=backup" which can be used to backup the wiki.d directory and subdirectory too. You can configure the directory to save backups, the backup format and, at the end of creation of backup file, show a link to download it. The wiki.d directory only contains the text of the contents, which in many cases is not enough. See BackupAndRestore for a more complete list of files recommended for manual backups, and, eventually, an automated way to do it. -- Susan Backup directory might be created by hand and given 777 rights. The variable redefining the backup directory should be set before the script inclusion. 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();
$RecentChangesFmt = "";
$BackupDir = '/mybackupdirectory/';
include_once('cookbook/backup_pages.php');
?>
RestrictionsThe script save only files which are in the /wiki.d/ directory. You should save the content of the /files/ directory apart. There is an alternative version which backs up all directories with custom content
This backup page can be read protected though
See alsoErrorSubstitute If ($DateFormat = 1 ) {
in the script with: If ($DateFormat == 1 ) {
This will solve the Date-Bug, that you are just able to use the american time format. ContributorSteveAgl - Script author PRZ - Standard Cookbook format and addition info on how to use the recipe CommentsSee discussion at BackupPages-Talk |