Backup instruction moved to piki
This commit is contained in:
parent
6b110b61b8
commit
859d073a7e
21
README.md
21
README.md
@ -60,24 +60,3 @@ Now there are two ways to finalise your configuration. The first way is for a te
|
|||||||
|
|
||||||
###Start the Server
|
###Start the Server
|
||||||
python manage.py runserver
|
python manage.py runserver
|
||||||
|
|
||||||
|
|
||||||
## Backup
|
|
||||||
### Create Backup files
|
|
||||||
source venv/bin/activate
|
|
||||||
python manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e sessions -e auth.Permission -e sessions -e pages --indent 2 > dump_pages.json
|
|
||||||
tar -cvzf dump_data.tgz data/media data/pages data/media
|
|
||||||
|
|
||||||
### Restore Backup
|
|
||||||
|
|
||||||
source venv/bin/activate
|
|
||||||
|
|
||||||
If you are starting without a database, you need to create one
|
|
||||||
|
|
||||||
python manage.py migrate
|
|
||||||
|
|
||||||
Afterward add data step by step to the database.
|
|
||||||
|
|
||||||
python manage.py loaddata dump_pages.json
|
|
||||||
rm -rf data/pages data/media
|
|
||||||
tar -xvzf dump_data.tgz
|
|
||||||
|
@ -12,6 +12,9 @@ MAIN = mycreole.render_simple(_(
|
|||||||
|
|
||||||
**piki** is a minimal wiki implemented with python and django.
|
**piki** is a minimal wiki implemented with python and django.
|
||||||
|
|
||||||
|
== Get it
|
||||||
|
For download and installation instructions, visit [[https://git.mount-mockery.de/application/piki]].
|
||||||
|
|
||||||
== Help
|
== Help
|
||||||
* [[creole|Creole Markup Language]]
|
* [[creole|Creole Markup Language]]
|
||||||
* [[access|Access Control for the site content]]
|
* [[access|Access Control for the site content]]
|
||||||
@ -79,11 +82,37 @@ This search pattern can also be combined with other search text via logical oper
|
|||||||
* [[/search/?q=modified_time%3A%5B-5d+to+now%5D| modified_time:[-5d to now] ]] results in a list of all pages which have been modified within the last 5 days.
|
* [[/search/?q=modified_time%3A%5B-5d+to+now%5D| modified_time:[-5d to now] ]] results in a list of all pages which have been modified within the last 5 days.
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
|
BACKUP = mycreole.render_simple(_(
|
||||||
|
"""
|
||||||
|
= Backup
|
||||||
|
With the following command, you create a backup of your piki. It contains out of two files. {{{pages.json}}} \
|
||||||
|
includes userdata, bottombar configurations and so on. The pages are included in {{{pages.tgz}}}.
|
||||||
|
{{{
|
||||||
|
$ cd <PROJECT_DIRECTORY>
|
||||||
|
$ source venv/bin/activate
|
||||||
|
$ python manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e sessions -e auth.Permission -e sessions -e pages --indent 2 > pages.json
|
||||||
|
$ tar -czf pages.tgz data/pages data/media
|
||||||
|
}}}
|
||||||
|
|
||||||
|
= Recovery
|
||||||
|
Be carefull with these commands. They delete all the data, before recovering from the backup files!
|
||||||
|
{{{
|
||||||
|
$ cd <PROJECT_DIRECTORY>
|
||||||
|
$ source venv/bin/activate
|
||||||
|
$ rm db.sqlite3
|
||||||
|
$ rm -rf data/pages data/media
|
||||||
|
$ python manage.py migrate
|
||||||
|
$ python manage.py loaddata pages.json
|
||||||
|
$ tar -xvzf pages.tgz
|
||||||
|
}}}
|
||||||
|
"""))
|
||||||
|
|
||||||
help_pages = {
|
help_pages = {
|
||||||
'main': MAIN,
|
'main': MAIN,
|
||||||
'creole': CREOLE,
|
'creole': CREOLE,
|
||||||
'access': ACCESS,
|
'access': ACCESS,
|
||||||
'search': SEARCH,
|
'search': SEARCH,
|
||||||
|
'backup': BACKUP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +122,7 @@ def actionbar(context, request, current_help_page=None, **kwargs):
|
|||||||
('2', 'Creole'),
|
('2', 'Creole'),
|
||||||
('3', 'Access'),
|
('3', 'Access'),
|
||||||
('4', 'Search'),
|
('4', 'Search'),
|
||||||
|
('5', 'Backup'),
|
||||||
)
|
)
|
||||||
for num, name in actionbar_entries:
|
for num, name in actionbar_entries:
|
||||||
context[context.ACTIONBAR].append_entry(
|
context[context.ACTIONBAR].append_entry(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user