Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextcloud.export looking for /var/snap/nextcloud/common/nextcloud/data instead of configured directory #1961

Open
cbeleites opened this issue Dec 16, 2021 · 2 comments
Labels
feature New feature or request

Comments

@cbeleites
Copy link

Describe the bug

nextcloud.export stops with error rsync: change_dir "/var/snap/nextcloud/common/nextcloud/data" failed: No such file or directory (2)

To Reproduce

  • I have datadirectory configured to /media/...
  • A backup HDD is mounted to /var/snap/nextcloud/common/backups/ while doing the backup
  • on nextcloud export I get:
Waiting for MySQL... done
WARNING: This functionality is still experimental and under
development, use at your own risk. Note that the CLI interface is
unstable, so beware if using from within scripts.

Enabling maintenance mode... done
Exporting apps...
        230.50M 100%   23.60MB/s    0:00:09 (xfr#4304, to-chk=0/4735)   
Exporting database...
Exporting config...
Exporting data...
rsync: change_dir "/var/snap/nextcloud/common/nextcloud/data" failed: No such file or directory (2)
              0 100%    0.00kB/s    0:00:00 (xfr#0, to-chk=0/0)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
Unable to export data
Disabling maintenance mode... done

Expected behavior

nextcloud.export should work with other than default data directory configured.

Workaround

create a symlink: /var/snap/nextcloud/common/nextcloud$ ln -s /media/.../data

nextcloud.export now works as expected.

OS/snapd/snap version

What OS and version are you running? Please also include the output of the
following commands:

$ snap list nextcloud
Name       Version      Rev    Tracking       Publisher   Notes
nextcloud  22.2.3snap1  28662  latest/stable  nextcloud✓  -

and:

$ snap version
snap    2.53.4
snapd   2.53.4
series  16
ubuntu  20.04
kernel  5.4.0-1045-raspi

Logs

Please paste in the output from
this script
to assist in debugging (note that it's pre-formatted).

(will do if needed once the now running backup is finished - not sure whether that'd help since the actual value of datadirectory would anyways be ***REMOVED SENSITIVE VALUE*** )

@kyrofa
Copy link
Member

kyrofa commented Jan 31, 2022

Yeah it's true, the data directory is hard-coded to the default in the export job. We need to figure out a way to obtain that information from bash that doesn't mask sensitive values.

@kyrofa kyrofa added the feature New feature or request label Jan 31, 2022
@ppittle
Copy link

ppittle commented Apr 15, 2023

I also ran into this issue and am trying the workaround:

create a symlink: /var/snap/nextcloud/common/nextcloud$ ln -s /media/.../data

Could you add a section to the Tips & Tricks section of the Wiki on how to use the workaround to perform a backup if you've moved the data directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants