Backup & Restore Plugin - Beta Version<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/BackupRestorePlugin | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | Introduction | ||||||||||||||||||||||||||||||
> > | Overview | ||||||||||||||||||||||||||||||
This is a solution to backup, restore and upgrade TWiki sites. It can be used via browser and on the command line. This plugin is pre-installed in TWiki-5.1 and later releases; it can be installed in older TWiki releases as low as TWiki-2001-09-01 (Athens Release) to easily create a backup that can be restored on a new TWiki release. This offers an easy upgrade path for TWiki. | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | Note: The initial plugin release does not yet offer the restore functionality. Check TWiki:Plugins.BackupRestorePlugin![]() | ||||||||||||||||||||||||||||||
> > | This plugin backs up page data, attachment data, the plugin workspace area and the TWiki configuration. However, it does not backup the TWiki engine, additional plugins and skins you might have installed. It is recommended to do a manual backup of the whole twiki directory after installing plugins and skins. | ||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Web-based OperationThe backup and restore functionality is restricted to members of the TWikiAdminGroup. Once configured, visit the BackupRestoreConsole to:
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | Screenshot: | ||||||||||||||||||||||||||||||
> > | Screenshot of Backup & Restore Console, overview: | ||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
How to Upgrade TWikiThe TWikiUpgradeGuide describes how to manually upgrade TWiki. It is much easier to use the BackupRestorePlugin to do a TWiki upgrade. Follow these steps:
![]() | ||||||||||||||||||||||||||||||
Command Line Utility and Cron | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | The bin/backuprestore utility can be used to create a backup (scheduled or manually), to copy a backup and to check on the status of the backup process. | ||||||||||||||||||||||||||||||
> > | The backuprestore utility can be used to create a backup (scheduled or manually), to copy a backup and to check on the status of the backup process. | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < | Important: The utility must run as the same user as the CGI scripts executed by the webserver. This can be apache , nobody , www-data , wwwrun or the like, and depends on the webserver configuration. | ||||||||||||||||||||||||||||||
> > | ![]() | ||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Scheduled backups can be done with a cron job![]() 10 0 * * 0 (cd /path/to/twiki/bin; ./backuprestore create_backup >/dev/null 2>&1)Make sure the plugin is configured properly before creating backups. The backup destination can be local or remote. If remote, the remote server needs to be mounted on the TWiki server via NFS or the like. | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Specification
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Syntax RulesThis section is only relevant to plugin developers. This plugin handles a%BACKUPRESTORE{"..."}% variable to perform all web-based operations. The variable is used in the BackupRestoreConsole page.
%BACKUPRESTORE{"..."}% parameters:
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Limitations and To-Do | |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
License and Bug ReportingThis plugin has been reasonably tested. If you find any issues please file a bug report at TWikibug:BackupRestorePlugin![]() ![]() | ||||||||||||||||||||||||||||||
Plugin Installation & ConfigurationNote: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. This plugin is pre-installed in TWiki-5.1.0 and newer.
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
# Path to backup destination directory. Can be a volume mounted to the file system.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{BackupDir} = '/tmp';
# Keep number of backups (e.g. delete old backups), 0 to keep all.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{KeepNumberOfBackups} = '7';
# Path to temp directory, used by BackupRestorePlugin daemon for temporary data.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{TempDir} = '/tmp';
# Path to zip command with options to recursively archive files and directory.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{createZipCmd} = '/usr/bin/zip -r';
# Path to unzip command with options to list all files.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{listZipCmd} = '/usr/bin/unzip -l';
# Path to unzip command with options to unzip all files with option to overwrite existing files.
$TWiki::cfg{Plugins}{BackupRestorePlugin}{unZipCmd} = '/usr/bin/unzip -o';
# Debug plugin. See output in data/debug.txt
$TWiki::cfg{Plugins}{BackupRestorePlugin}{Debug} = 0;
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||
Plugin Info
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||
Backup & Restore Plugin - Beta Version<-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/BackupRestorePlugin IntroductionThis is a solution to backup, restore and upgrade TWiki sites. It can be used via browser and on the command line. This plugin is pre-installed in TWiki-5.1 and later releases; it can be installed in older TWiki releases as low as TWiki-2001-09-01 (Athens Release) to easily create a backup that can be restored on a new TWiki release. This offers an easy upgrade path for TWiki. Note: The initial plugin release does not yet offer the restore functionality. Check TWiki:Plugins.BackupRestorePlugin![]() Web-based OperationThe backup and restore functionality is restricted to members of the TWikiAdminGroup. Once configured, visit the BackupRestoreConsole to:
![]() Command Line Utility and CronThebin/backuprestore utility can be used to create a backup (scheduled or manually), to copy a backup and to check on the status of the backup process.
apache , nobody , www-data , wwwrun or the like, and depends on the webserver configuration.
Scheduled backups can be done with a cron job![]() 10 0 * * 0 (cd /path/to/twiki/bin; ./backuprestore create_backup >/dev/null 2>&1)Make sure the plugin is configured properly before creating backups. The backup destination can be local or remote. If remote, the remote server needs to be mounted on the TWiki server via NFS or the like. Specification
Syntax RulesThis section is only relevant to plugin developers. This plugin handles a%BACKUPRESTORE{"..."}% variable to perform all web-based operations. The variable is used in the BackupRestoreConsole page.
%BACKUPRESTORE{"..."}% parameters:
Limitations and To-Do
Plugin Installation & ConfigurationNote: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. This plugin is pre-installed in TWiki-5.1.0 and newer.
Plugin Info
|