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

Can't manually sync a snapper configuration with same name as target folder #8

Open
automorphism88 opened this issue Aug 27, 2017 · 2 comments

Comments

@automorphism88
Copy link

automorphism88 commented Aug 27, 2017

I recently downloaded snapsync and noticed that my default snapper configuration named root for my / subvolume would not sync to the folder I had set up with snapsync init, with Thor throwing an EISDIR error saying root was a directory and exiting.

After some trial and error I discovered that renaming my snapper configuration from root to something else solved the issue. Otherwise it's working well, thanks for your work.

EDIT: I discovered the error actually results from having the target directory with the same name as the snapper config you want to sync to it, regardless of whether that's root or something else. It doesn't matter if the full path is given or not, just what the top level directory is called (i.e. snapsync sync foo /mnt/snapsync/foo produces the same effect as cd /mnt/snapsync && snapsync sync foo foo). This is a natural naming scheme for users who want to sync some, but not all, of their snapper configurations.

@automorphism88 automorphism88 changed the title Can't manually sync a snapper configuration named 'root' Can't manually sync a snapper configuration with same name as target folder Aug 28, 2017
@doudou
Copy link
Owner

doudou commented Aug 30, 2017

Could you attach a backtrace ? Thanks.

@automorphism88
Copy link
Author

Turns out it only happens if you refer to the target directory with relative path. If you have a snapsync configuration called bar and you want to sync it into /foo/bar then cd /foo && snapsync sync bar barwill produce an error but cd / && snapsync sync bar /foo/bar works fine.

/usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/snapper_config.rb:111:in `readlines': Is a directory @ io_fillbuf - fd:7 thunderbird (Errno::EISDIR)
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/snapper_config.rb:111:in `readlines'
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/snapper_config.rb:111:in `load'
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/snapper_config.rb:86:in `load'
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/cli.rb:17:in `config_from_name'
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/lib/snapsync/cli.rb:69:in `sync'
	from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /usr/lib64/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	from /usr/lib64/ruby/gems/2.4.0/gems/snapsync-0.3.8/bin/snapsync:4:in `<top (required)>'
	from /usr/bin/snapsync:9:in `load'
	from /usr/bin/snapsync:9:in `<main>'

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

No branches or pull requests

2 participants