How to backup nextcloud

I just used the docker files from the Nextcloud repository on Github to set up a private server. Now I want to do backup.

In the administrator manual it says
"Zero-downtime backups via Btrfs snapshots, component failure leads to interruption of service. Alternate backup scheme on other filesystems: nightly backups with service interruption." [1]

In the backup section it shows some commands but doesn’t mention if I should put the system in some kind of maintenance mode before doing backup?

If someone can clarify it I will make a pull request to update the docs :slight_smile:

The files and database need to match, so I would recommend putting Nextcloud in maintenance mode before starting, or if you can create a snapshot using Btrfs or LVM, this should effectively do the same thing, but there may be a synchronisation in progress when you perform the snapshot, so this may create incomplete files when you restore the backup.

I wouldn’t run a backup without maintenance mode enabled.