create new tag
, view all tags

BackupRestorePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on BackupRestorePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please file bug reports in the BackupRestorePlugin bug database.

BackupRestorePlugin Feedback and Development

First version posted. Enjoy. I am looking forward to feedback.

-- PeterThoeny - 2011-08-13

New version posted. It is now easy to upgrade a TWiki site, see details at BackupRestorePlugin#UpgradeTWiki.

-- PeterThoeny - 2011-09-06

Possible enhancement suggested in Support.SID-01257: Enhance the plugin to automatically re-encode the page data and page history in case the character set differs between backup and current TWiki site (for example from ISO-8859-15 to UTF-8).

-- PeterThoeny - 2011-09-06

Peter, I've run into an issue with the backup and restore plugin. using the zip command under unix in RHEL or CENTOS 5.X or older releases zip does not support archives larger than 4 Gigs in size. since this zip is all in one archive and we have a lot of data in twiki it wont work. I would suggest that you switch to tar + gzip or some other format options in the documentation that work for large archive sizes. I'm going to do some testing by switching commands to rar or p7zip and report back on issues encountered.

-- JudBarron - 2012-06-07

7za command line errors out, doesn't like some of the built in arguments given, setting rar options seems to be working with the backup script.

$TWiki::cfg{Plugins}{BackupRestorePlugin}{createZipCmd} = '/usr/bin/rar a -r';
$TWiki::cfg{Plugins}{BackupRestorePlugin}{listZipCmd} = '/usr/bin/rar l';
$TWiki::cfg{Plugins}{BackupRestorePlugin}{unZipCmd} = '/usr/bin/rar e o+';

Will report back in a while after it finishes and I see if the archive will extract properly.

-- JudBarron - 2012-06-07

the output of rar l doesn't get parsed correctly so you can select webs in the detail screen of the backup. it appears to backup fully all the data no problem using the create command.

-- JudBarron - 2012-06-07

Jud, thanks for looking into this. The zip file size limitation has been reported before, TWikibug:Item6841. What file extensions does rar produce? The plugin likely needs to be enhanced to support multiple archive file extensions.

-- PeterThoeny - 2012-06-07

you can generate a .zip extension file name, or .rar if you choose to. rar can use zip format archives that are larger than 4 gigs in size (64 bit zip archives) but the output from rar l (thats lowercase L) to list the archive contents has a format that the current script cannot deal with.

I'm trying to update my twiki from 4.3 to 5.1 and wanted to use this plugin, however it appears to be too problematic due to the zip restrictions and the amount of data in our internal twiki. frown

-- JudBarron - 2012-06-07

Perhaps this is a silly question but since there are several Archive:: formats available on CPAN wouldn't it make sense to use a perl interface for creating, viewing contents, and extraction so you could support multiple archive formats?

rar listing (either the l or v argument to the rar command) put the filename first before all the file meta data. unzip puts the file name and path last.

rar v /path/to/archive gives you the path with the directory information, the lowercase L gives you just the file name. Still not sure how I can make this work. grr!

-- JudBarron - 2012-06-07

I've downloaded and compiled from source the current release of zip 3.0 and unzip 6.0 and will try those. http://sourceforge.net/projects/infozip/files/

-- JudBarron - 2012-06-07

Using the compiled versions from sourceforge I was able to get the existing plugin to work, however this was a very frustrating process! Hope a better solution for the plugin is possible down the road for those of us with 5+ gigs of zipped twiki data! Thanks Peter.

-- JudBarron - 2012-06-07

Thank you Jud for reporting your experience, aka upgrade ordeal. I updated the plugin docs accordingly.

-- PeterThoeny - 2012-08-02

I am facing the following problems- please solve it. ERROR: Can't create backup twiki-backup-2012-11-08-10-11.zip. [Thu Nov 8 10:11:40 2012] backuprestore: Can't exec "/var/www/twiki/lib": Permission denied at /var/www/twiki/lib/TWiki/Plugins/BackupRestorePlugin/CaptureOutput.pm line 89.

ERROR: Can't create backup twiki-backup-2012-11-08-10-11.zip. [Thu Nov 8 10:11:40 2012] backuprestore: Can't exec "/var/www/twiki/lib": Permission denied at /var/www/twiki/lib/TWiki/Plugins/BackupRestorePlugin/CaptureOutput.pm line 89.

ERROR: Can't create backup twiki-backup-2012-11-08-10-11.zip. [Thu Nov 8 10:11:40 2012] backuprestore: Can't exec "/var/www/twiki/lib": Permission denied at /var/www/twiki/lib/TWiki/Plugins/BackupRestorePlugin/CaptureOutput.pm line 89.

-- TusarGuru - 2012-11-08

Permission issue. Please ask support questions in the Support web, stating details such as configure settings of the plugin.

-- PeterThoeny - 2012-11-08

I created backup from 5.1.2, than installed 5.1.4 on separate linux box and trying to restore, but got in web:

ERROR: Restore can only be called from the console

I registered myself as new user, included this user to AdminGroup.

backup file permission is 777 and www-data.

root@twiki-turnkey twiki514/bin# ./backuprestore status DEBUG: constructor DEBUG: backuprestore, action=status backup_status: 0 file_name: twiki-backup-2013-03-12-14-32.zip std_err_start: ERROR: Restore can only be called from the console std_err_end

-- Pavel Patcheptsov - 2013-03-12

Pavel, since you bought TWiki from Turnkey I suggest you get support from them. Or, better yet, download & upgrade to our VM.

-- Peter Thoeny - 2013-03-12

Thanks for point to native twiki VM, I'll try it.

I decide to use Turnkey image, due it's extremely fast way to deploy new instance: one minute for download, one for start and few minutes for delete existing turnkey twiki 5.1.1 and replace it with the newest 5.1.4, configure and here you are - restore plugin doesn't work on Turnkey machine:)

I spent a lot of time to setup our current Twiki on CentOS 6.3 but I failed to start second Twiki with SpeedyCGI on same host for update reason, so I decided to use ready solution to update from one host to another.

-- Pavel Patcheptsov - 2013-03-13


I am in the process of migrating to a new V. 6 TWiki server. On our old server we used the Main web for our data. I think of creating a separate web for our data on the new server. Is it possible to use this plugin to backup the data from our old server's Main and restore the data into a Web with another name?

-- Detlef Marxsen - 2014-01-08

Detlef, not automated. Use the plugin to create the backup. Do first a restore without the Main web (e.g. uncheck the Main web), then do a manual restore of the Main web to your new web.

Manual restore: Unzip to temp location, copy recursively data/Main/* and pub/Main/* to your new TWiki's data/Newweb and pub/Newweb, respectively. Make sure the file ownership is right.

-- Peter Thoeny - 2014-01-08

Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r16 - 2014-01-08 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.