Hi,
There are two different cases here, and they should not be mixed.
If you only remove/recreate containers and images, but keep the AIO Docker volumes and the configured NEXTCLOUD_DATADIR, then the instance can normally continue using the existing state. Containers are disposable; the persistent state is in the volumes/datadir.
However, if you remove the AIO volumes as well and only keep NEXTCLOUD_DATADIR, that is not a full restore of the instance.
The datadir contains the file data and some app-related data, but it is not the whole Nextcloud instance. Important parts such as the PostgreSQL database, users, passwords, shares, calendars, contacts, app configuration, file metadata, and AIO configuration live outside the datadir.
One important AIO-specific detail: if you recreate or restart the AIO mastercontainer via Docker Compose after the initial installation, make sure the existing AIO mastercontainer volume is reused correctly.
For example, the AIO mastercontainer volume should be declared with the exact name and marked as external after it has already been created:
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
external: true
This matters because nextcloud_aio_mastercontainer stores the AIO configuration/state used by the mastercontainer. Marking it as external tells Docker Compose that this is an existing persistent volume which must be reused, not treated as a new project-managed volume. It also helps avoid accidentally removing or replacing it when recreating the stack.
More here - Proxmox + NGINX + Nextcloud AIO + Watchtower Deployment Guide
So for your questions:
-
Keeping only NEXTCLOUD_DATADIR is not enough to rebuild the same AIO instance with users, passwords, calendars, shares, etc. intact. At best, you may still have the raw files, but not a consistent restored Nextcloud instance.
-
No, backing up only the datadir is not equivalent to an AIO/Borg backup. A complete backup needs at least the database, the relevant AIO Docker volumes/configuration, and the datadir, taken in a consistent state.
If you do not want to rely only on the built-in Borg backup, I would not replace it with a datadir-only backup. A safer approach is to keep the AIO Borg backup and additionally have an independent backup/snapshot strategy for the whole AIO state: all relevant Docker volumes plus the external datadir, with the containers stopped properly before the backup.
In short: datadir backup is useful, but it is not a complete Nextcloud backup. And when recreating AIO with Docker Compose, make sure the existing nextcloud_aio_mastercontainer volume is reused, typically with external: true after the first setup.