Skip to content

Commit 9a0a877

Browse files
Manas-Kengestevepiercyrohnsha0
authored
Migrate backing up Plone docs (#1919)
* migrate backup plone docs * rephrase sentences * use one sentence per line * Remove todo and note * - Complete review - Add glossary term "blob" * move content * Update preparations.md * Update docs/glossary.md --------- Co-authored-by: Steve Piercy <web@stevepiercy.com> Co-authored-by: Rohan Shaw <86848116+rohnsha0@users.noreply.github.com>
1 parent 451ef78 commit 9a0a877

File tree

4 files changed

+104
-13
lines changed

4 files changed

+104
-13
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "How to Back up and restore a Plone site that was installed using buildout"
5+
"property=og:description": "How to Back up and restore a Plone site that was installed using buildout"
6+
"property=og:title": "Back up and restore a Plone site"
7+
"keywords": "Plone 6, admin, install, configuration, upgrade, buildout"
8+
---
9+
10+
(back-up-and-restore-a-plone-buildout-label)=
11+
12+
# Back up and restore a Plone buildout
13+
14+
This chapter explains how to back up and restore a Plone site that was installed using buildout.
15+
16+
(backup-your-plone-site-label)=
17+
18+
## Back up your Plone site
19+
20+
```{danger}
21+
Always back up your Plone site before upgrading.
22+
```
23+
24+
This back up guide assumes the following.
25+
26+
- You back up your Plone site.
27+
- You back up your buildout and its caches.
28+
- You back up your persistent data storage using a strategy that maintains data integrity without taking down your Plone site, that is performed periodically with adequate frequency, and that stores sufficient versions of your data.
29+
- You've tested the restore process.
30+
31+
32+
### Where's my data?
33+
34+
Your Plone instance installation contains a directory {file}`./var`.
35+
This directory is located in the same directory as the file {file}`buildout.cfg`.
36+
It holds the frequently changing data files for the instance.
37+
{file}`./var` contains the instance's log, process ID, and socket files.
38+
39+
The following directories contain your instance's content.
40+
41+
42+
#### {file}`./var/filestorage`
43+
44+
The Zope Object Database ({term}`ZODB`) file storage is maintained in the directory {file}`./var/filestorage`.
45+
The default file name is {file}`Data.fs`, although you could have multiple files or renamed it.
46+
It's typically a large file which contains everything except {term}`blob`s.
47+
48+
The other files in this directory with the file extensions of `.index`, `.lock`, `.old`, or `.tmp` are ephemeral, and will be recreated by Zope if they're absent.
49+
50+
51+
#### {file}`./var/blobstorage`
52+
53+
The directory {file}`./var/blobstorage` contains a deeply nested directory hierarchy that contains the blobs of your database.
54+
These files may include PDFs, images, videos, office automation files, and other binary objects.
55+
56+
`filestorage` and `blobstorage` are maintained synchronously.
57+
`filestorage` has references to blobs in `blobstorage`.
58+
If the two storages are not synchronized, you'll get errors whenever their data is accessed.
59+
60+
61+
### `collective.recipe.backup`
62+
63+
[`collective.recipe.backup`](https://pypi.org/project/collective.recipe.backup/) is a well-maintained buildout recipe that maintains data integrity for a live Plone database.
64+
65+
See its `README.md`'s section [Introduction](https://github.com/collective/collective.recipe.backup?tab=readme-ov-file#introduction) for its buildout recipe configuration.
66+
67+
The recipe supports several options, all of which are documented its `README.md`'s section [Supported options](https://github.com/collective/collective.recipe.backup/blob/master/README.rst#supported-options).
68+
69+
Perhaps the most useful option is `location`, which sets the destination for backup files.
70+
Its default value is `var/backups`, inside the buildout directory.
71+
The backup destination, may be any attached location, including another partition, drive, or network storage.
72+
73+
74+
#### Operation
75+
76+
After running buildout to configure `collective.recipe.backup`, you'll find {file}`bin/backup` and {file}`bin/restore` scripts in your buildout directory.
77+
Since all options are set via buildout, there are few command-line options, and operation is generally through bare commands.
78+
79+
{file}`bin/restore` will accept a date-time argument, if you keep multiple backups.
80+
For restore operations, stop Plone before starting your restore, and restart after the restore is complete.
81+
82+
{file}`bin/backup` is commonly included in a cron table for regular operation.
83+
You can run backup operations without stopping Plone.
84+
Make sure you test your backup and restore process before you need it.
85+
86+
87+
### Incremental backups
88+
89+
`collective.recipe.backup` offers both incremental and full backups, and will maintain multiple versions of backups.
90+
Tune these to meet your needs.
91+
92+
When you enable incremental backups, the database packing operation will automatically cause the next backup to be a full backup.
93+
94+
If your backup continuity need is critical, then your incremental backup schedule may need to be frequent.
95+
Some Plone sites require incremental backups every few minutes.

docs/admin-guide/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ configure-zope
3434
add-ons
3535
export-import
3636
override-core
37+
backup-restore-plone-buildout
3738
/upgrade/index
3839
```
3940
% TODO: uncomment and add the following link to the Operate toctree when https://github.com/plone/volto/pull/6397 is merged.

docs/backend/upgrading/preparations.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ myst:
44
"description": "Plone upgrade preparations"
55
"property=og:description": "Plone upgrade preparations"
66
"property=og:title": "Plone upgrade preparations"
7-
"keywords": "Plone, upgrade, preparations"
7+
"keywords": "Plone, upgrade, preparations, ZODB, collective.recipe.backup, buildout, backup, restore"
88
---
99

1010

1111
(upgrade-preparations-label)=
1212

1313
# Preparations
1414

15-
This chapter lists things to do before you migrate Plone.
15+
This chapter describes things to do before you migrate Plone.
1616

1717

1818
(upgrade-gather-informationlabel)=
@@ -52,22 +52,13 @@ If Plone is being upgraded at the same time as a Zope version, Plone will usuall
5252

5353
## Back up your Plone site
5454

55-
```{danger}
56-
Always back up your Plone site before upgrading.
57-
```
58-
5955
```{seealso}
60-
See Plone 5.2 documentation, [Backing up your Plone deployment](https://5.docs.plone.org/manage/deploying/backup.html).
56+
For a Plone site installed via buildout, follow {doc}`/admin-guide/backup-restore-plone-buildout` for details.
6157
```
6258

63-
```{todo}
64-
Migrate the Plone 5.2 docs for Backing up your Plone deployment into Plone 6 docs.
65-
```
66-
67-
6859
(upgrade-setup-a-test-environment-to-rehearse-the-upgrade-label)=
6960

70-
## Setup a test environment to rehearse the upgrade
61+
## Set up a test environment to rehearse the upgrade
7162

7263
```{danger}
7364
Never work directly on your live site until you know that the upgrade was successful.

docs/glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,4 +919,8 @@ TDD
919919
- Write the functional code until the test passes.
920920
- Refactor both new and old code to make it well structured.
921921
922+
blob
923+
Binary large object
924+
A blob is a mass of data in binary form that does not necessarily conform to any file format.
925+
922926
```

0 commit comments

Comments
 (0)