Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Nextcloud restore issue with symlinked data directory

    Support
    2
    2
    117
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tobru
      tobru last edited by

      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).

      1 Reply Last reply Reply Quote 0
      • subven
        subven last edited by

        Create a backup using rsync and restore from it 🙂 rsync does not store symlinks (as tgz does).

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Powered by NodeBB