Moin,
I try my first steps with nextcloud on UCS. Using without backup is bullshit.
My first attempt in backup and restore failed. What was my way?
The Core of backup
-> directory: tar -vcpzf ZIEL QUELLE
-> database: sudo -i -u postgres pg_dump -v -Fd nextcloud -f ZIEL
The Core of restore:
Restore Data-Directory
-> Delete the directory: cd /var/lib/univention-appcenter/apps/nextcloud rm -r -f data mkdir data
-> extract the backup: tar -vxpzf /BACKUP0/NEXTCLOUD/SAVE_YYYYMMTT/DATA_YYYYMMTT_HHMMSS/nexdata.tar.gz -C /
Restore database
-> delete database: sudo -i -u postgres dropdb nextcloud
-> restore from dump: sudo -i -u postgres pg_restore --format=d /BACKUP0/NEXTCLOUD/SAVE_YYYYMMTT/BASE_YYYYMMTT_HHMMSS
Set fingerprint
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ maintenance:data-fingerprint
Whats wrong?
Thomas_M:
Whats wrong?
What exaclty did fail?
Where is the output after execution od each step?
I have problems with the restore of a directory to the database with pg_restore.
After the described restore nextcloud didn’t start.
I decided to install the whole server again.
Now nextcloud is working on the new installation.
Next time I want to restore on a new installation in a better way.
Thats the reason I ask for the right way to backup an nextcloud-installation on UCS.
Take a look to Nextcloud - guide:
https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html
https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html
The nextcloud db-password can be found with the Nextcloud docker:
univention-app shell nextcloud
less var/www/html/config/config.php
If your UCS-server is running in a VM, create a snapshot before testing. So you will be able to restore the snapshot, if your tests fail.
Thank you very much for your fast feedback.
In 2020 my work and my familiy cost a lot of power.
So I will save your hints and try in a few weeks.
kfk
December 14, 2022, 3:39am
6
Sorry for the necro post, but if you have some further info on how to get the restore to work I am, as you can see in the link, much interested
Hello,
We have just purchased a new dedicated box, we would like to migrate our whole setup to the new server but I have not been able to find any guides on doing this? So far I have just taken a snapshot of the old server and installed it on the new server, but that kind of defeats the purpose of having this new server since we wanted to try and set up a real domain instead of just having everything on one server…
So to reiterate my question:
How do I migrate app with all their data to a ne…