On Sat, Apr 18, 2020 at 12:20:34PM +0200, Unicorn wrote: > > I keep a nightly backup of the database (postgres in my case), > > upgrade packages and trigger nextcloud's upgrade process via HTTPS > > on the nextcloud login page. This process has not failed for me so > > far. Except when postgres had a version bump as well with some > > incompatible DB format changes, and I stupidly upgraded postgres > > without checking whether my DB backup was current. Turned out it was > > a day or so behind. But I could restore this DB backup to a newly > > created postgres database and nextcloud kept working. > > Thanks a ton for the input, I will give this procedure a shot! > > Since I am also using postgres and don't have much experience working > with databases, I would appreciate advice on backing up postgres. Do > you use the syntax from the NC docs ( > https://docs.nextcloud.com/server/18/admin_manual/maintenance/backup.html#backup-database > ) with something like a cron job, or would you advise something > different/additional?
For the DB see /usr/local/share/doc/pkg-readmes/postgresql-server which has an upgrade section that contains dump/load commands to use. My nextcloud data files are backed up with rsync over SSH.