Backup and restore issue

Hello,
I have TrueNAS-12.0-U2.1 with Nextcloud 21.0.0

I have follow this step for backup and restore from old to new machines

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html
https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html

so In old machines:

  • maintenance mode on
  • rsync -Aavx nextcloud/ nextcloud-dirbkp_bk-test/
  • mysqldump --single-transaction -h localhost -u dbadmin -p nextcloud > nextcloud-sqlbkp_bk-test.bak
  • maintenance mode off

then In new machines:

  • fresh install nextcloud plugin
  • maintenance mode on
  • rsync -Aax nextcloud-bk-test/ nextcloud/
  • mysql -h localhost -u dbadmin -p -e “DROP DATABASE nextcloud”
  • mysql -h localhost -u dbadmin -p -e “CREATE DATABASE nextcloud”
  • mysql -h localhost -u dbadmin -p nextcloud < nextcloud-sqlbkp_bk-test.bak
  • maintenance mode off

but when try to access from ui in new machines he says this error “Access denied”. Probably because in the config.php file there is a credential of old machines db.

what am I missing?

1 Like

I’d try searching for your exact output + the config.php variables in this forum along with the www. No doubt it has been asked and answered before. Good luck!