Restore with very old backup

Nextcloud version : 21
Operating system and version : Ubuntu 20.04, using docker compose
Apache or nginx version : whatever is provided by the official apache docker image
PHP version (eg, 7.4): whatever is provided by the official apache docker image


I accidentally deleted my nextcloud docker-compose folder, which contains everything but the data directory. The data directory is available, as it is outside this docker-compose folder.

I have a 4 months old complete backup of both my docker-compose folder (database, config and so on) and my data directory as it was at that time (besides the data directory of the deleted instance), so I can easilly restore everything to how it was 4 months ago.

I also have a copy of my calendars in ics format as they are today, that I could get by exporting the calendars from an up to date client.

I only wish to restore the settings, data and calendars. No need to restore other things such as contacts.

My question is what would be the best procedure to restore my instance and populate it with fresh data.

For the files I would:

  1. restore the old backup of the docker-compose folder, pointing it to the current data directory
  2. run occ files:scan
  3. go out of mintenance mode and start file clients one by one

Would that work?

For the calendar, is there any way to update the calendars contained in the database with these up-to-date ics versions?


i think so.
but i guess you should do occ maintenance:data-fingerprint as well.

1 Like