Explorar el Código

Backup instruction moved to piki

master
Dirk Alders hace 2 meses
padre
commit
859d073a7e
Se han modificado 2 ficheros con 30 adiciones y 21 borrados
  1. 0
    21
      README.md
  2. 30
    0
      pages/help.py

+ 0
- 21
README.md Ver fichero

@@ -60,24 +60,3 @@ Now there are two ways to finalise your configuration. The first way is for a te
60 60
 
61 61
 ###Start the Server
62 62
     python manage.py runserver
63
-
64
-
65
-## Backup
66
-### Create Backup files
67
-    source venv/bin/activate
68
-    python manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e sessions -e auth.Permission -e sessions -e pages --indent 2 > dump_pages.json
69
-    tar -cvzf dump_data.tgz data/media data/pages data/media
70
-
71
-### Restore Backup
72
-
73
-    source venv/bin/activate
74
-
75
-If you are starting without a database, you need to create one
76
-
77
-    python manage.py migrate
78
-
79
-Afterward add data step by step to the database.
80
-
81
-    python manage.py loaddata dump_pages.json
82
-    rm -rf data/pages data/media
83
-    tar -xvzf dump_data.tgz

+ 30
- 0
pages/help.py Ver fichero

@@ -12,6 +12,9 @@ MAIN = mycreole.render_simple(_(
12 12
 
13 13
 **piki** is a minimal wiki implemented with python and django.
14 14
 
15
+== Get it
16
+For download and installation instructions, visit [[https://git.mount-mockery.de/application/piki]].
17
+
15 18
 == Help
16 19
 * [[creole|Creole Markup Language]]
17 20
 * [[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
79 82
 * [[/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.
80 83
 """))
81 84
 
85
+BACKUP = mycreole.render_simple(_(
86
+    """
87
+= Backup
88
+With the following command, you create a backup of your piki. It contains out of two files. {{{pages.json}}} \
89
+includes userdata, bottombar configurations and so on. The pages are included in {{{pages.tgz}}}.
90
+{{{
91
+$ cd <PROJECT_DIRECTORY>
92
+$ source venv/bin/activate
93
+$ python manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e sessions -e auth.Permission -e sessions -e pages --indent 2 > pages.json
94
+$ tar -czf pages.tgz data/pages data/media
95
+}}}
96
+
97
+= Recovery
98
+Be carefull with these commands. They delete all the data, before recovering from the backup files!
99
+{{{
100
+$ cd <PROJECT_DIRECTORY>
101
+$ source venv/bin/activate
102
+$ rm db.sqlite3
103
+$ rm -rf data/pages data/media
104
+$ python manage.py migrate
105
+$ python manage.py loaddata pages.json
106
+$ tar -xvzf pages.tgz
107
+}}}
108
+"""))
109
+
82 110
 help_pages = {
83 111
     'main': MAIN,
84 112
     'creole': CREOLE,
85 113
     'access': ACCESS,
86 114
     'search': SEARCH,
115
+    'backup': BACKUP
87 116
 }
88 117
 
89 118
 
@@ -93,6 +122,7 @@ def actionbar(context, request, current_help_page=None, **kwargs):
93 122
         ('2', 'Creole'),
94 123
         ('3', 'Access'),
95 124
         ('4', 'Search'),
125
+        ('5', 'Backup'),
96 126
     )
97 127
     for num, name in actionbar_entries:
98 128
         context[context.ACTIONBAR].append_entry(

Loading…
Cancelar
Guardar