Nextcloud restore issue with symlinked data directory
-
I'm trying to move Nextcloud to a new Cloudron server. On the original Cloudron server I made the data directory a symlink to another bigger disk:
root@my:/home/yellowtent/appsdata/dc3a15ad-9993-4e5c-9039-46e73d048341# ls -Alh data lrwxrwxrwx 1 root root 19 Oct 28 2018 data -> /srv/nextcloud-data
This symlink is now part of the backup, which breaks the restore on the new server:
2022-09-28T19:14:39.287Z box:backupformat/rsync Recreating empty directories in {"localRoot":"/home/yellowtent/appsdata/dc3a15ad-9993-4e5c-9039-46e73d048341","layout":[]} 2022-09-28T19:14:39.290Z box:apptask run: app error for state pending_restore: BoxError: unable to symlink: EEXIST: file already exists, symlink '/srv/nextcloud-data' -> '/home/yellowtent/appsdata/dc3a15ad-9993-4e5c-9039-46e73d048341/data' at restoreFsMetadata (/home/yellowtent/box/src/backupformat/rsync.js:152:33) at async Object.download (/home/yellowtent/box/src/backupformat/rsync.js:232:5) at async download (/home/yellowtent/box/src/backuptask.js:75:5) at async Object.downloadApp (/home/yellowtent/box/src/backuptask.js:110:5) at async install (/home/yellowtent/box/src/apptask.js:398:9) { reason: 'FileSystem Error', details: {} }
It looks like the
data/
directory gets created first and then while restoring it already exists.Any idea how I could restore this backup?
(And yes, I'm aware that this symlink method isn't officially supported - It was the only way to achieve having an external storage back in 2018).