diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2022-06-19 14:24:02 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2022-06-19 14:24:02 +0000 |
commit | 1a246f622a72b345aa4d94f56cb977f62c4a8fbe (patch) | |
tree | 0ad323398f3a3fa9b28a34ef3c201411e917c65d /wikilib.d/PmWiki.BackupAndRestore | |
parent | be40d68b231620cc45f0a748e8903278f223f26f (diff) | |
download | pmwiki.svn-1a246f622a72b345aa4d94f56cb977f62c4a8fbe.tar.bz2 |
Documentation update.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4108 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'wikilib.d/PmWiki.BackupAndRestore')
-rw-r--r-- | wikilib.d/PmWiki.BackupAndRestore | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wikilib.d/PmWiki.BackupAndRestore b/wikilib.d/PmWiki.BackupAndRestore index c9fa1ac0..d36d4c96 100644 --- a/wikilib.d/PmWiki.BackupAndRestore +++ b/wikilib.d/PmWiki.BackupAndRestore @@ -1,11 +1,11 @@ -version=pmwiki-2.2.118 ordered=1 urlencoded=1 -author=Petko +version=pmwiki-2.3.5 ordered=1 urlencoded=1 +author=simon charset=UTF-8 -csum=see also at bottom, fix h2/h3 structure +csum=fix Gmane link, http+s (+15) ctime=1134693395 name=PmWiki.BackupAndRestore -rev=40 +rev=41 targets=Cookbook.Cookbook,PmWiki.Uploads,Cookbook.BackupWithRsync,Cookbook.TwoWayMirroringWithRsync,Cookbook.BackupPages,Cookbook.BackupHTMLZip -text=(:title Backup and Restore:)%0a(:Summary:background information and some basic backup and restore procedures:)%0a%0aThis page has some background information on making backups and explains some basic *nix backup and restore procedures.%0a%0a!! Introduction%0a%0aYour wiki installation contains some unique data in the following directories:%0a%0a local/ Local configuration scripts%0a cookbook/ Recipes obtained from the [[(Cookbook:)Cookbook]]%0a pub/ Publicly accessible files%0a wiki.d/ Wiki pages%0a uploads/ [[Uploads|Uploaded files]] (attachments)%0a%0aA good backup plan will include periodically archiving these directories — or at bare minimum [@local/@] and [@wiki.d/@]. Good practice dictates keeping your backup archives on a separate machine.%0a%0a!! Simple Backup and Restore (*nix)%0a%0aWhen it comes to backup, simpler is better. %0aSince the pmwiki distribution is very small (about 1/4 megabyte), it's simplest to just archive the distribution files along with the data.%0a%0a!!! Making a Backup Archive%0a%0aThe following *nix command, executed from the parent directory of your wiki's directory, will put a complete backup archive of your site in your home directory.%0a%0a-> [@%0atar -zcvf ~/wiki-backup-`date +%25Y%25m`.tar.gz wiki/%0a@]%0a%0a[[#restore]]%0a!!! Restoring the Backup Archive%0a%0a!!!! Simple Method%0a%0aYour site can be restored and running in under 30 seconds with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0afind wiki/uploads/ -type d |xargs chmod 777%0afind wiki/wiki.d/ -type d |xargs chmod 777%0a@]%0a%0a!!!! A Slightly-More-Secure Method%0a%0aThe simple restore commands above will give you world-writable files and directories. You can avoid world-writable permissions by letting PmWiki create directories with the proper attributes (ownership and permissions) for you.%0a%0aStart with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0arm -rf wiki/wiki.d%0arm -rf uploads%0achmod 2777 wiki/%0a@]%0a%0aNow upload a file in each group that had uploads. If your site doesn't have uploads, just visit your site once so the wiki.d/ directory will be created.%0a%0aFinish your installation with%0a%0a-> [@%0achmod 755 wiki/%0atar -zxvf ~/wiki-backup-200512.tar.gz%0a@]%0a%0a%0a!!! Details%0a%0aThe commands on this page assume your site is in a directory called "wiki/". The test backup was made in December, 2005 so it's named accordingly.%0a%0aYour site will only have an uploads/ directory if uploads are enabled.%0a%0aThe backup command uses a date stamp (YYYYMM) in the filename. If you automate the command via cron you'll wind up with monthly snapshots of your site. You can get a daily snapshot by appending %25d to the date command ([@`date +%25Y%25m%25d`@] will get you YYYYMMDD). Be wary of space limitations if you have a large uploads/ directory.%0a%0a%0a!! Miscellaneous%0a%0a!!! Backup via FTP%0aDownload and install a ftp client like [[http://filezilla-project.org/download.php?type=client|Filezilla]]%0a%0a# Using the ftp client connect to the server where you host pmWiki using%0a## the IP address (ex: 123.234.56.67) or the ftp name (ex: ftp.myhost.com)%0a## supply your account name (ex: mylogin) and password (ex: myp4ssw0rd)%0a# Move to your pmWiki directory (ex: @@/usr/mylogin/web/wiki/@@ or @@/tahi/public_html/pmwiki@@ )%0a# Select the folder you want to backup as explained before (probably either only the data or the whole wiki directory)%0a** for data you will want to backup both the directories%0a*** @@wiki.d@@ for user page data%0a*** @@pmwikiuploads@@ (or @@uploads@@) for your attachments (uploads)%0a** for system you will want, at a minimum, to backup both the directories%0a*** @@local@@ for configuration data %0a*** @@pub@@ for local CSS and skins customisations%0a# Download them to a local folder%0a# Use [[http://www.7-zip.org/ | 7zip]] or a similar software to build an archive of this backup%0a%0aYou can also very easily sync your FTP directories with your hard disc via this command line:%0a-> [@ wget -nv -np -m ftp://user:password@ftp.yourhost.net/ @]%0a'-Download [[http://gnuwin32.sourceforge.net/packages/wget.htm | Wget for Windows]] (other systems normally have it installed).-'%0a%0aAlternatively, you can also mirror your FTP directories with lftp:%0a-> [@ lftp -u your_user_name,your_password -e "mirror --verbose /wiki.d /path/to/local/folder" ftp://your_host @]%0a(this will mirror only the /wiki.d folder, replace with / to mirror everything)%0a%0a[[#rsync]]%0a!!! Using rsync%0aSee Cookbook:BackupWithRsync and Cookbook:TwoWayMirroringWithRsync.%0a%0a!! See Also%0a%0a* A [[http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/20317| thread]] [gmane.org] on the pmwiki-users mailing list.%0a* A [[(Cookbook:)Backup Pages]] recipe in the cookbook.%0a* A [[(Cookbook:)Backup HTML Zip]] recipe in the cookbook.%0a -time=1567166412 +text=(:title Backup and Restore:)%0a(:Summary:background information and some basic backup and restore procedures:)%0a%0aThis page has some background information on making backups and explains some basic *nix backup and restore procedures.%0a%0a!! Introduction%0a%0aYour wiki installation contains some unique data in the following directories:%0a%0a local/ Local configuration scripts%0a cookbook/ Recipes obtained from the [[(Cookbook:)Cookbook]]%0a pub/ Publicly accessible files%0a wiki.d/ Wiki pages%0a uploads/ [[Uploads|Uploaded files]] (attachments)%0a%0aA good backup plan will include periodically archiving these directories — or at bare minimum [@local/@] and [@wiki.d/@]. Good practice dictates keeping your backup archives on a separate machine.%0a%0a!! Simple Backup and Restore (*nix)%0a%0aWhen it comes to backup, simpler is better. %0aSince the pmwiki distribution is very small (about 1/4 megabyte), it's simplest to just archive the distribution files along with the data.%0a%0a!!! Making a Backup Archive%0a%0aThe following *nix command, executed from the parent directory of your wiki's directory, will put a complete backup archive of your site in your home directory.%0a%0a-> [@%0atar -zcvf ~/wiki-backup-`date +%25Y%25m`.tar.gz wiki/%0a@]%0a%0a[[#restore]]%0a!!! Restoring the Backup Archive%0a%0a!!!! Simple Method%0a%0aYour site can be restored and running in under 30 seconds with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0afind wiki/uploads/ -type d |xargs chmod 777%0afind wiki/wiki.d/ -type d |xargs chmod 777%0a@]%0a%0a!!!! A Slightly-More-Secure Method%0a%0aThe simple restore commands above will give you world-writable files and directories. You can avoid world-writable permissions by letting PmWiki create directories with the proper attributes (ownership and permissions) for you.%0a%0aStart with%0a%0a-> [@%0atar -zxvf ~/wiki-backup-200512.tar.gz%0arm -rf wiki/wiki.d%0arm -rf uploads%0achmod 2777 wiki/%0a@]%0a%0aNow upload a file in each group that had uploads. If your site doesn't have uploads, just visit your site once so the wiki.d/ directory will be created.%0a%0aFinish your installation with%0a%0a-> [@%0achmod 755 wiki/%0atar -zxvf ~/wiki-backup-200512.tar.gz%0a@]%0a%0a%0a!!! Details%0a%0aThe commands on this page assume your site is in a directory called "wiki/". The test backup was made in December, 2005 so it's named accordingly.%0a%0aYour site will only have an uploads/ directory if uploads are enabled.%0a%0aThe backup command uses a date stamp (YYYYMM) in the filename. If you automate the command via cron you'll wind up with monthly snapshots of your site. You can get a daily snapshot by appending %25d to the date command ([@`date +%25Y%25m%25d`@] will get you YYYYMMDD). Be wary of space limitations if you have a large uploads/ directory.%0a%0a%0a!! Miscellaneous%0a%0a!!! Backup via FTP%0aDownload and install a ftp client like [[https://filezilla-project.org/download.php?type=client|Filezilla]]%0a%0a# Using the ftp client connect to the server where you host PmWiki using%0a## the IP address (ex: 123.234.56.67) or the ftp name (ex: ftp.myhost.com)%0a## supply your account name (ex: mylogin) and password (ex: myp4ssw0rd)%0a# Move to your pmWiki directory (ex: @@/usr/mylogin/web/wiki/@@ or @@/tahi/public_html/pmwiki@@ )%0a# Select the folder you want to backup as explained before (probably either only the data or the whole wiki directory)%0a** for data you will want to backup both the directories%0a*** @@wiki.d@@ for user page data%0a*** @@pmwikiuploads@@ (or @@uploads@@) for your attachments (uploads)%0a** for system you will want, at a minimum, to backup both the directories%0a*** @@local@@ for configuration data %0a*** @@pub@@ for local CSS and skins customisations%0a# Download them to a local folder%0a# Use [[https://www.7-zip.org/ | 7zip]] or a similar software to build an archive of this backup%0a%0aYou can also very easily sync your FTP directories with your hard disc via this command line:%0a-> [@ wget -nv -np -m ftp://user:password@ftp.yourhost.net/ @]%0a'-Download [[https://sourceforge.net/projects/getgnuwin32/ | Wget for Windows]] (other systems normally have it installed).-'%0a%0aAlternatively, you can also mirror your FTP directories with lftp:%0a-> [@ lftp -u your_user_name,your_password -e "mirror --verbose /wiki.d /path/to/local/folder" ftp://your_host @]%0a(this will mirror only the @@/wiki.d@@ folder, replace with / to mirror everything)%0a%0a[[#rsync]]%0a!!! Using rsync%0aSee Cookbook:BackupWithRsync and Cookbook:TwoWayMirroringWithRsync.%0a%0a!! See Also%0a%0a* A [[https://www.pmwiki.org/pipermail/pmwiki-users/2005-December/thread.html#20661| backups thread]] on the pmwiki-users mailing list.%0a* A [[(Cookbook:)Backup Pages]] recipe in the cookbook.%0a* A [[(Cookbook:)Backup HTML Zip]] recipe in the cookbook.%0a +time=1654858981 title=Backup and Restore |