Wikirestore
Revision as of 17:19, 25 February 2021 by Tim Holzheim (talk | contribs) (Created page with "= Description = Tool to restore wiki pages from an local backup, created with wikibackup, to an destination wiki. = Arguments = {| class="wikitable" |- !| Argument !| Descri...")
Description
Tool to restore wiki pages from an local backup, created with wikibackup, to an destination wiki.
Arguments
Argument | Description |
---|---|
-s | Source wiki - Only used to query page names. The queried page names will then be looked up in the backup. |
-t | Target wiki - The backup is restored in this wiki |
-q | SMW query to select the pages to be restored. Note that the query is only used to select the page names the actual backup is then restored from the local backup. |
-p | Names of the pages to be restored |
--backupPath | define location of the backup. Default is the default backup location of the target wiki. |
If argument -s is used a page query is executed therefore all arguments related to an page query can be used such as -ui and --limit.
Examples
--backupPath
Use this argument to define a different backup folder
wikibackup
1$ wikibackup -s orth --backupPath "/home/user/wikibackup/orth_copy" -q "[[isA::Event]]" --limit 10
2
3downloading 10 pages from orth to /home/user/wikibackup/orth_copy
41/10 ( 10%): downloading " DBKDA 2021" ...✅
52/10 ( 20%): downloading "ENERGY 2021" ...✅
63/10 ( 30%): downloading "ICAS 2021" ...✅
74/10 ( 40%): downloading "ICNS 2021" ...✅
85/10 ( 50%): downloading 2021 ICIMP ...✅
96/10 ( 60%): downloading 3DUI 2020 ...✅
107/10 ( 70%): downloading 3IA 2009 ...✅
118/10 ( 80%): downloading 3PGIC 2010 ...✅
129/10 ( 90%): downloading 4S4D 2017 ...✅
1310/10 ( 100%): downloading 5GU 2017 ...✅
wikirestore
$ wikirestore -t orth --backupPath "/home/user/wikibackup/orth_copy"
restoring 10 pages from /home/user/wikibackup/orth_copy to orth
1/10 ( 10%): restore 2021 ICIMP ...✅
2/10 ( 20%): restore "ICNS 2021" ...✅
3/10 ( 30%): restore 3PGIC 2010 ...✅
4/10 ( 40%): restore 4S4D 2017 ...✅
5/10 ( 50%): restore "ENERGY 2021" ...✅
6/10 ( 60%): restore 3DUI 2020 ...✅
7/10 ( 70%): restore " DBKDA 2021" ...✅
8/10 ( 80%): restore 3IA 2009 ...✅
9/10 ( 90%): restore "ICAS 2021" ...✅
10/10 ( 100%): restore 5GU 2017 ...✅
Scenario: Restore triangle
$ wikirestore -s or -q "[[isA:Event]]" -t orth --backupPath "/home/user/wikibackup/orth_copy"
With this command we query all page names that are an Event from the wiki or and restore them in the wiki orth with the version of the page that is stored in /home/user/wikibackup/orth_copy.