Calendar and contact data path

I’m about to migrate to a new server and I don’t want to lose the contacts or the calendar events. My files data path already is a external hdd, so I believe with a fresh install I won’t lose that, but I’m worried about the contacts and event because the apps path is on the server disk that I will lose.

You have to take with you your Database, without it, you will loose everything except the datas but they will be raw, you will loose sharing, users etc…

So in order to migrate New Server you have to get with you the /data folder and a backup of your nextcloud database when you stop the nextcloud service.

The files in /nextcloud/apps/ etc… aren’t important, they will be back when you will install nextcloud on the new server

Thank you. I just installed nextcloud now just for testing. The real usage will be on my new to come server. But in the meantime I have deleted all my google contacts and put in only on nextcloud. I just don’t want to lose that now.
What will I lose if I don’t backup the nextcloud database and begin with a new database?

Near everything.
You have to start and configure it from stratch.
You have to re-create user then you have to re-import the data you put inside.
The database is crucial in nextcloud, it knows all about users, sharing, apps, versionning, trashbin etc

Alright, you convinced me. Will backup the DB. Thank you

So you have to take 3 things :

1- the data folder
2- the database
3- the config.php file in config folder.

With this 3 things you will migrate perfectly your nextcloud instance. You will just have to modify your dns with the new ip of the new server