1
1
# Backup
2
2
3
- This App allows admin to create backup images of their Nextcloud
3
+ This App allows admin to create and store backup images of their Nextcloud
4
4
5
+ ## Restoring Points
5
6
7
+ A restoring point is an image of your Nextcloud at a specific time. A restoring point can be:
6
8
7
- ## Restoring Points
9
+ - '** Complete** ' (or Full) and contains a backup of :
10
+ * the instance of Nextcloud (core),
11
+ * the apps of the Nextcloud (from ` apps/ ` and ` custom_apps/ ` ),
12
+ * A dump of the database,
13
+ * the data of the Nextcloud including users' files.
8
14
9
- A restoring point is an image of your Nextcloud at a specific time.
10
- A restoring point can be:
11
- - a '** full** ' backup that contains all data that are managed by the App,
12
- - an '** incremental** ' backup that only contains modified files since your last 'full' backup.
15
+ - '** Partial** ' (or Incremental) that contains a backup of :
16
+ * the instance of Nextcloud,
17
+ * the apps of the Nextcloud,
18
+ * A dump of the database,
19
+ * data that have been generated or edited since the last ** Complete Backup**
13
20
14
21
### What data are available in a Restoring Point
15
22
16
- Please note that the Backup App will not store ALL data from your Nextcloud. As an example, remote files does not have backup.
23
+ Please note that the Backup App will not store ALL data from your Nextcloud. As an example, remote files
24
+ does not have backup.
17
25
This is a quick list of what can be restored and what cannot be restored when using the Backup App:
18
26
19
27
A restoring point will store
28
+
20
29
- your current Nextcloud,
21
30
- the ` apps/ ` folder,
22
31
- your local data, defined by ` 'datadirectory' ` in ` config/config.php ` ,
@@ -25,14 +34,28 @@ A restoring point will store
25
34
- A full dump of your database.
26
35
27
36
A restoring point will ** NOT** store:
37
+
28
38
- Remote data, even if the filesystem is available locally.
29
39
30
- A Restoring Point also contains a file named ` metadata.json ` that contains information like:
40
+ A Restoring Point also contains a file named ` restoring-point.data ` that contains metadata about the
41
+ backup:
42
+
31
43
- Version of your Nextcloud
32
- - The ID of the full backup in case of incremental backups ,
44
+ - The ID of the parent backup in case of partial backup ,
33
45
- The list of compressed file that contains the backup files,
34
46
- Checksum for those files,
35
- - the date of the restoring point.
47
+ - the date of the restoring point,
48
+ - information related to the health of the files
49
+
50
+ _ Note: the file ` restoring-point.data ` can confirm the integrity of all files and parts of the backup. If
51
+ the file is lost, it is still possible to restore a restoring point.
52
+ The normal process is to re-create the ` restoring-point.data ` a new one, however :
53
+
54
+ - there is no way to confirm the integrity of content of the backup,
55
+ - the restoring process will require some knowledge from the admin about the infrastructure from the
56
+ original instance that generated the backup.
57
+
58
+
36
59
37
60
## Quick documentation:
38
61
@@ -52,36 +75,31 @@ You can upload your backup files on a remote instance
52
75
53
76
./occ backup:remote:remove cloud.example.net
54
77
55
-
56
- ** Note** : if you enable the backup on remote instance, it is strongly advice to [ keep your current setup somewhere] ( ) , or
57
- your files won't be available without your identity nor readable without your encryption key
58
-
78
+ ** Note** : if you enable the backup on remote instance, it is strongly advice
79
+ to [ keep your current setup somewhere] ( ) , or your files won't be available without your identity nor
80
+ readable without your encryption key
59
81
60
82
### Manage your restoring point
61
83
62
-
63
84
** Create a new Restoring Point**
64
85
65
86
./occ backup:point:create [--incremental]
66
87
67
88
The ` --incremental ` option will create an incremental backup
68
89
69
-
70
90
** Upload a Restoring Point**
71
91
72
92
./occ backup:point:upload <pointId>
73
93
74
- This will request all configured remote instances to check the sanity of any previous upload for this Restoring
75
- Point, and will only upload missing/faulty file.
76
-
94
+ This will request all configured remote instances to check the sanity of any previous upload for this
95
+ Restoring Point, and will only upload missing/faulty file.
77
96
78
97
** List restoring points**
79
98
80
99
./occ backup:point:list
81
100
82
101
You can search and compare restoring point available locally and on configured remote instance.
83
102
84
-
85
103
** Search for a specific file:**
86
104
87
105
./occ backup:file:search [--since|--until|--point] <string>
@@ -90,7 +108,6 @@ Search for a file, based on its name.
90
108
91
109
example: ` ./occ backup:file:search test.jpg --since 2021-09-23 `
92
110
93
-
94
111
** History of specific a file:**
95
112
96
113
./occ backup:file:history [--since|--until] <dataPack> <fullPath>
@@ -99,59 +116,55 @@ Display the history of a file.
99
116
100
117
example: ` ./occ backup:file:history data cult/files/backup1.md `
101
118
102
-
103
119
** Import a Restoring Point**
104
120
105
- If you start using the app, you will face at one point a situation where an important Restoring Point is available somewhere but cannot be find in your database.
106
- As an example, when restoring a Backup, all Restoring Point created after this backup won't be in database anymore. This is normal as restoring the backup fully overwrite your database.
107
- In that case, you can run this command:
121
+ If you start using the app, you will face at one point a situation where an important Restoring Point is
122
+ available somewhere but cannot be find in your database. As an example, when restoring a Backup, all
123
+ Restoring Point created after this backup won't be in database anymore. This is normal as restoring the
124
+ backup fully overwrite your database. In that case, you can run this command:
108
125
109
126
./occ backup:point:scan <pointId>
110
127
111
- If it cannot be found, you will need to manually copy the folder that contains the Restoring Point in the appdata folder: data/appdata_qwerty123/backup/
112
-
128
+ If it cannot be found, you will need to manually copy the folder that contains the Restoring Point in the
129
+ appdata folder: data/appdata_qwerty123/backup/
113
130
114
131
** Verify integrity of a Restoring Point**
115
132
116
133
./occ backup:point:details <pointId>
117
134
118
-
119
-
120
135
## Restoration
121
136
122
137
You can restore a single file or the whole instance to a previous state:
123
138
124
139
./occ backup:point:restore <pointId> [--file <filename>] [--data <dataPack>] [--chunk chunkName]
125
140
126
- Please note that you can go back to a previous backup of your instance from any Nextcloud compatible with the Backup App.
127
- There is no need to install the exact same version as it will be reverted to the one used when creating the Restoring Point.
128
- Meaning that you can fully restore your instance of Nextcloud even if you lost your harddrive, as long as you kept a copy of
129
- the Restoring Point (upload to another remote instance)
130
-
141
+ Please note that you can go back to a previous backup of your instance from any Nextcloud compatible with
142
+ the Backup App. There is no need to install the exact same version as it will be reverted to the one used
143
+ when creating the Restoring Point. Meaning that you can fully restore your instance of Nextcloud even if
144
+ you lost your harddrive, as long as you kept a copy of the Restoring Point (upload to another remote
145
+ instance)
131
146
132
147
## Exporting configuration
133
148
134
- This is an important step of your configuration of the Backup App
135
- Some information will be needed in case you start storing your backup on remote instances:
149
+ This is an important step of your configuration of the Backup App Some information will be needed in case
150
+ you start storing your backup on remote instances:
136
151
137
152
- The identity of your Nextcloud,
138
153
- The encryption key used to encrypt your backup.
139
154
140
- ** While the identity can be changed and your access to the remote files can be restored by
141
- executing some command on the remote instance to update your new identity, a missing encryption
142
- key means that your remote backup cannot be decrypted and are totally useless.**
155
+ ** While the identity can be changed and your access to the remote files can be restored by executing some
156
+ command on the remote instance to update your new identity, a missing encryption key means that your
157
+ remote backup cannot be decrypted and are totally useless.**
143
158
144
159
** Please note that creating a new identity will disable the sanity check on the metadata file.**
145
160
146
161
./occ backup:setup:export [--key] > ~/backup_setup.json
147
162
148
- Using the ` --key ` option will generate a Key, used to encrypt/decrypt the data of your setup.
149
- The key generated during the export of your setup needs to be stored somewhere safe!
163
+ Using the ` --key ` option will generate a Key, used to encrypt/decrypt the data of your setup. The key
164
+ generated during the export of your setup needs to be stored somewhere safe!
150
165
151
166
./occ backup:setup:import [--key <key>] < ~/backup_setup.json
152
167
153
-
154
-
155
168
### Known issues, missing features:
156
169
157
170
- files are not encrypted when uploading to a remote instance
0 commit comments