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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Nextcloud restore issue with symlinked data directory

Nextcloud restore issue with symlinked data directory

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 987 Views 2 Watching
  • 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.
  • tobruT Offline
    tobruT Offline
    tobru
    wrote on last edited by
    #1

    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
    0
    • subvenS Offline
      subvenS Offline
      subven
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search