Today the install holds three test files and a backup takes two minutes. In six months it will hold everything, and the backup habit you skipped will take a weekend you do not have. Start now.
Every backup guide gets read twice: once by people planning, once by people recovering. Be the first kind. A Nextcloud backup is only real when it holds three parts together - the data directory, the database, and the configuration - and the snap ships a command that packs all three. The best day to run it first is install day, while the whole thing is still tiny and a restore test costs nothing.
It is the most natural mistake in self-hosting: the files are right there, so copy them and call it done. But Nextcloud's truth lives in two places - the data directory holds the file contents, while the database holds the users, passwords, shares, group membership and the index of which file belongs to whom. Restore files without the database and you have a pile of other people's documents with no doors back into them. A real backup always moves data, database and config as one set, taken at one moment.
The snap was designed for exactly this: it provides its own export and import commands that package the whole instance.
sudo nextcloud.export - it stops the services briefly, gathers data, database and configuration, and writes one dated backup folder under the snap's backup area inside /var/snap/nextcloud/commonRestoring is the mirror command, sudo nextcloud.import, pointed at the backup folder on the target machine.
Install day proves the method; the routine protects the data. A pattern that fits a home or small office:
An untested backup is a rumour. While the install is young, do the whole circle once: install the snap on a spare machine or a virtual machine, copy your export across, run the import, log in, and open your files. It takes half an hour with today's tiny data - and it converts the worst day of your server's life from an experiment into a procedure you have already done. Repeat the test whenever you change anything big about the setup.
One step builds it - see the video, then give it its first backup the same day.
Watch Full VideoRoughly the size of your data plus a small database - which is the whole argument for starting on day one and keeping only a rolling few. A 200 GB archive means planning backup space like you planned the data disk: generously.
Yes - because it includes the database, the restore brings back accounts, groups, shares and settings, not just files. That is precisely the part a folder copy can never give you.
Somewhere that cannot die in the same accident as the server: an external disk stored in another room or building, another computer, or reputable cloud storage. Same disk, same room, same flood - that is one copy with extra steps.