Skip to content

Migrate backing up Plone docs #1919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
fea8c1e
migrate backup plone docs
Manas-Kenge Mar 19, 2025
68df52e
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Mar 20, 2025
7d5c32b
rephrase sentences
Manas-Kenge Mar 20, 2025
d728aa1
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Mar 28, 2025
68a4db8
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 1, 2025
cc94877
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 2, 2025
5669806
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 2, 2025
5b49675
Merge branch '6.0' into migrate-backing-up-plone
rohnsha0 Apr 5, 2025
be2b03d
use one sentence per line
Manas-Kenge Apr 5, 2025
abc6ce5
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Apr 6, 2025
030180a
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Apr 9, 2025
fb9494c
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 13, 2025
82e39a6
Remove todo and note
stevepiercy Mar 25, 2025
8dababc
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 13, 2025
93da5f3
Merge remote-tracking branch 'Manas-Kenge/documentation/migrate-backi…
stevepiercy Apr 13, 2025
5d8fe94
- Complete review
stevepiercy Apr 13, 2025
6d6ba51
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Apr 24, 2025
51e59d5
Merge branch '6.0' into migrate-backing-up-plone
stevepiercy Apr 28, 2025
e85a07a
move content
Manas-Kenge Apr 28, 2025
47cc2f5
Merge branch '6.0' into migrate-backing-up-plone
Manas-Kenge Apr 28, 2025
efe2d4e
Update preparations.md
stevepiercy Apr 29, 2025
54e2735
Update docs/glossary.md
stevepiercy Apr 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions docs/admin-guide/backup-restore-plone-buildout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
myst:
html_meta:
"description": "How to Back up and restore a Plone site that was installed using buildout"
"property=og:description": "How to Back up and restore a Plone site that was installed using buildout"
"property=og:title": "Back up and restore a Plone site"
"keywords": "Plone 6, admin, install, configuration, upgrade, buildout"
---

(back-up-and-restore-a-plone-buildout-label)=

# Back up and restore a Plone buildout

This chapter explains how to back up and restore a Plone site that was installed using buildout.

(backup-your-plone-site-label)=

## Back up your Plone site

```{danger}
Always back up your Plone site before upgrading.
```

This back up guide assumes the following.

- You back up your Plone site.
- You back up your buildout and its caches.
- 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.
- You've tested the restore process.


### Where's my data?

Your Plone instance installation contains a directory {file}`./var`.
This directory is located in the same directory as the file {file}`buildout.cfg`.
It holds the frequently changing data files for the instance.
{file}`./var` contains the instance's log, process ID, and socket files.

The following directories contain your instance's content.


#### {file}`./var/filestorage`

The Zope Object Database ({term}`ZODB`) file storage is maintained in the directory {file}`./var/filestorage`.
The default file name is {file}`Data.fs`, although you could have multiple files or renamed it.
It's typically a large file which contains everything except {term}`blob`s.

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.


#### {file}`./var/blobstorage`

The directory {file}`./var/blobstorage` contains a deeply nested directory hierarchy that contains the blobs of your database.
These files may include PDFs, images, videos, office automation files, and other binary objects.

`filestorage` and `blobstorage` are maintained synchronously.
`filestorage` has references to blobs in `blobstorage`.
If the two storages are not synchronized, you'll get errors whenever their data is accessed.


### `collective.recipe.backup`

[`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.

See its `README.md`'s section [Introduction](https://github.com/collective/collective.recipe.backup?tab=readme-ov-file#introduction) for its buildout recipe configuration.

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).

Perhaps the most useful option is `location`, which sets the destination for backup files.
Its default value is `var/backups`, inside the buildout directory.
The backup destination, may be any attached location, including another partition, drive, or network storage.


#### Operation

After running buildout to configure `collective.recipe.backup`, you'll find {file}`bin/backup` and {file}`bin/restore` scripts in your buildout directory.
Since all options are set via buildout, there are few command-line options, and operation is generally through bare commands.

{file}`bin/restore` will accept a date-time argument, if you keep multiple backups.
For restore operations, stop Plone before starting your restore, and restart after the restore is complete.

{file}`bin/backup` is commonly included in a cron table for regular operation.
You can run backup operations without stopping Plone.
Make sure you test your backup and restore process before you need it.


### Incremental backups

`collective.recipe.backup` offers both incremental and full backups, and will maintain multiple versions of backups.
Tune these to meet your needs.

When you enable incremental backups, the database packing operation will automatically cause the next backup to be a full backup.

If your backup continuity need is critical, then your incremental backup schedule may need to be frequent.
Some Plone sites require incremental backups every few minutes.
1 change: 1 addition & 0 deletions docs/admin-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ configure-zope
add-ons
export-import
override-core
backup-restore-plone-buildout
/upgrade/index
```
% TODO: uncomment and add the following link to the Operate toctree when https://github.com/plone/volto/pull/6397 is merged.
Expand Down
17 changes: 4 additions & 13 deletions docs/backend/upgrading/preparations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ myst:
"description": "Plone upgrade preparations"
"property=og:description": "Plone upgrade preparations"
"property=og:title": "Plone upgrade preparations"
"keywords": "Plone, upgrade, preparations"
"keywords": "Plone, upgrade, preparations, ZODB, collective.recipe.backup, buildout, backup, restore"
---


(upgrade-preparations-label)=

# Preparations

This chapter lists things to do before you migrate Plone.
This chapter describes things to do before you migrate Plone.


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

## Back up your Plone site

```{danger}
Always back up your Plone site before upgrading.
```

```{seealso}
See Plone 5.2 documentation, [Backing up your Plone deployment](https://5.docs.plone.org/manage/deploying/backup.html).
For a Plone site installed via buildout, follow {doc}`/admin-guide/backup-restore-plone-buildout` for details.
```

```{todo}
Migrate the Plone 5.2 docs for Backing up your Plone deployment into Plone 6 docs.
```


(upgrade-setup-a-test-environment-to-rehearse-the-upgrade-label)=

## Setup a test environment to rehearse the upgrade
## Set up a test environment to rehearse the upgrade

```{danger}
Never work directly on your live site until you know that the upgrade was successful.
Expand Down
4 changes: 4 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -919,4 +919,8 @@ TDD
- Write the functional code until the test passes.
- Refactor both new and old code to make it well structured.

blob
Binary large object
A blob is a mass of data in binary form that does not necessarily conform to any file format.

```