-
Notifications
You must be signed in to change notification settings - Fork 430
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
vfs_fruit: Add capability to advertise FULLSYNC #64
vfs_fruit: Add capability to advertise FULLSYNC #64
Conversation
Maybe you should mention the options needed to get time machine working:
Is that correct? |
Hi @cgrossde, those are the required options. I am not sure that level of documentation belongs in the module documentation but I can easily see both sides of the argument to be honest. If others think it is beneficial and should go in to the module documentation, I can gladly add it. |
My intention was to document it here on Github, once this makes it into Samba a lot of people will try it out and might run into problems if their configuration doesn't match the requirement. Maybe they find this issue or the bug. I also think that it would cloud the module documentation. Another thing to consider is to set these options automatically when |
Thanks for supporting this option in samba. Now, i compiled that branch and activated the options in the smb.conf. What else needs to be done ? samba works fine but time machine does not provide the option to store a backup on the share. Did i miss something else in the config / did i misunderstand something ? Thanks ! Apart from that, i reviewed the code +1 |
@derkostka You also need to configure an avahi service to advertise the share. I am unsure of what distribution you are using but dropping a service file in /etc/avahi/services/timemachine.service with the following contents should get it to show up.
Replace the string "timemachine" in @cgrossde I will see if I can find a good spot for the configuration options in the documentation. I can see your point with regards to it not necessarily being straight forward for new users. Given the changes around locking, I'm not sure if setting the configuration options automatically would be best. I'll wait till the samba developers weigh in on the bug report to see what method they prefer. |
@kevinanderson1 works well, thanks ! I will report back in case of any issues. |
Sorry to ask again, is there any chance to debug this options (testparm or wireshark) ? Maybe there is smth that needs to be generally adjusted in the config: Testparm output of the related share is:
smb.conf
Thanks ! |
@derkostka so I am unsure of any potential interactions with the other options on your smb configuration but the following should be all that is needed.
If you are comfortable with Wireshark, doing a capture with the following filter before starting the backup should show why it is being rejected: "smb2.aapl.volume_caps". In the response if you expand the SMB2 sections, one should show a volume capabilities like the screen shot below. I'll rebuild the docker container that I use for my home server later today to see if I can reproduce it as well. |
Perfect. Thank you very much for your support. It is doing the initial backup right now on my production environment.
|
Using @kevinanderson1's configuration suggestion (only changing the path for the TM share), I am still getting a "volume does not support necessary options" error. Client is macOS 10.12.1 and server is FreeBSD 10.1. EDIT: Also tested on a Ubuntu 16.04 server, same result. |
@elliot-wood can you provide your smb.conf file? I don't know of any reason it wouldn't work on FreeBSD myself but it should work on Ubuntu. I'll spin up a FreeBSD machine when I get a chance to test. |
@elliot-wood I was able to compile the branch on FreeBSD 10.1 and have it work successfully. It sounds like something on your smb.conf is not quite right. Please see the config file below for what I used and compare against yours.
|
I can confirm that this patch and @kevinanderson1 's config above are working for timemachine backups on 10.12.1. I did run into several issues around users and file/dir permissions that resulted in error messages indicating "does not support required options". Once those were resolved things started working well. Thanks for this patch @kevinanderson1 |
@kevinanderson1 For my first attempt, I was taking the FreeBSD I'm trying to do build of the branch directly to avoid any issues that may have arisen from that, on a clean install of both FreeBSD 11.0 and 10.1. However, I'm running into an unrelated error at build time:
If you are using a clean installation of FreeBSD, can you detail your steps to building Samba on FreeBSD? |
@elliot-wood can you try and build @kevinanderson1 ´s fork on bsd or are other things changed in the source code for bsd ? Overall Feedback after a week:
|
@derkostka That's currently what I am attempting to do. See the build error in my previous message. My installation process, if it matters, is:
I've tried this on FreeBSD 11.0 and 10.1, to see if that'd make any difference. |
@elliot-wood Try this:
and then try building that branch again. I also had issues with the FreeBSD versions of TDB and talloc. Grab the latest from here and do the same as above. https://www.samba.org/ftp/tdb/ and https://www.samba.org/ftp/talloc/ Remember to I had issues with smbtorture compiling. It was complaining about |
@TheSkorm Couldn't get it to work. Samba also seems to be using a bundled tdb and talloc, and forcing it to use non-bundled libraries causes the configure script to fail:
This occurs when tdb 1.3.11 has been manually installed into @kevinanderson1 Could you provide how you got the branch to successfully compile on FreeBSD, or provide a disk image of a FreeBSD system where successful compilation is possible? |
Hi there, can you please tell us about those issues? What are the permissions and ownership of your share? Have you created a distinct user for Time Machine? Would be great to hear. Thanks in advance, |
@enke5 My permissions were largely related to my use of docker as a deployment choice. Nothing specific to time machine. What I ended up with was a docker container that had a Initially I tried to My dockerfile is - https://github.com/joemiller/docker-htpc/blob/master/timecapsule/Dockerfile .. with some other notes about usage in the readme https://github.com/joemiller/docker-htpc#timecapsule-samba |
@elliot-wood So I started with a clean install of FreeBSD 10.1. My shell history is gone so I don't have the packages I installed but I know I did the following to workaround missing LDAP and GnuTLS libraries. On a Linux machine I could resolve them pretty easily but FreeBSD is a different story. Even with that, I only recall installing one or two packages based on the output of the configure script.
|
OK. Thank you for your support. I was trying to add the patch to official ubuntu 16.04 sources (4.3) but that did not work, although the server query was answered correctly. |
@kevinanderson1 The difference might be in what packages you installed. I'm still getting the same issues I got from the start. If you could recreate your successful build and log what you did that would be greatly appreciated. |
@elliot-wood Here are the steps that I recreated to build it successfully. I completed this on a 10.1 FreeBSD install built from the FreeBSD 10.1 boot only ISO located here: http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-bootonly.iso
|
@elliot-wood I ran into the same issue and could solve it by executing
Among others, this removed Now |
@kevinanderson1 I’ve followed your steps and was able to successfully compile and install Samba from your branch on my FreeBSD 11 system. Samba is now installed to
I’ve then started nmbd and smbd:
When I try connect from my Mac to
The same config file was working with Samba 4.4 which I had installed via PKG. I’m not too familiar with Samba and I apologize if I’m making an obvious mistake here. It’s certainly not my intention to hijack this conversation for getting Samba support :-) |
@aaronk6 FreeBSD is certainly not my specialty but have you created users and set passwords? Since it is installed under /usr/local/samba, the users from the FreeBSD PKG version are different. In the time that I worked on this, the only time I saw similar errors where if I had not created any users or permissions on the underlying share were incorrect. |
@kevinanderson1 Forgot to mention that but yes, I’ve run |
Can I chip in into this? I'd like to see a small modifications This makes it unnecessary to use hacks like creating a loopback-mounted filesystem just to limit backup size (which can grown to fill the whole hdd if left to its own devices) |
@elfhack It would be great if we could set a limit like that for the time machine share. Maybe the global |
I think the patches from this pull request have gone in via a different route - see the mailing list thread "Latest Time Machine Patch" attached to https://lists.samba.org/archive/samba-technical/2017-October/123188.html . Poking about I see 127b18e and its parents which look like alternatives to the patches in this pull request. |
Adds support for automatically registering the required _adisk._tcp mDNS record based on the setting of "fruit:time machine". Signed-off-by: Omri Mor <omri50@gmail.com>
04f475d
to
cdd5b22
Compare
Should this pull request be closed now the code is merged? |
Also, does this mean https://bugzilla.samba.org/show_bug.cgi?id=12380 has been fixed? |
Has it been shipped into any samba version yet? If so, is there a tutorial on how to get this version and set up for time machine? Thanks. |
@yangm97 This code is too new to be in any version of samba other than git I'm afraid. Others have suggested it will most likely be in Samba 4.8 when that eventually ships. |
@slowfranklin just quickly while you're here - should this PR be closed and is https://bugzilla.samba.org/show_bug.cgi?id=12380 essentially fixed now? |
On Thu, Oct 26, 2017 at 07:09:04PM +0000, Sitsofe Wheeler wrote:
@slowfranklin just quickly while you're here - should this PR be closed and is https://bugzilla.samba.org/show_bug.cgi?id=12380 essentially fixed now?
yup, thanks. Closed.
…-slow
|
Does this just fake full sync or does it actually perform it? |
@msklvsk it can do either based on user choice - check out the commit: 174e6cb . I'd imagine the risk of faking it are similar to the faking any fsync - data that you "said" was on stable storage in the face of abrupt power loss might not be and could be missing or corrupt after power is restored (especially when viewed relative to other data that was supposed to only be written afterwards). |
Works perfectly, i just compiled samba 4.8 pre, thanks a lot ! |
I am a bit disoriented and new at this. I have an Ubuntu 16.04 (LTE) with samba 4.3.11-Ubuntu |
@Henrik41 it's not a simple patch, you'll need to download the source and compile/install it yourself as the official release of 4.8 isn't available yet. you won't see it in a simple package form until then and even then, you may need to upgrade your version of Ubuntu if the samba 4.8 package isn't made available for that version of ubuntu. |
@Henrik41 somewhere in the middle of this discussion @enke5 mentioned that he was trying to include this patch in official Ubuntu samba package for version 4.3. I am wondering too if they succeeded, or not. @enke5 can you, please, tell us how things are looking for 4.3 on Ubuntu 16? I personally would love to see this patch in 4.3 and not having to wait for 4.8, which won't be shipped as part of LTS anyway I guess. |
It looks like Ubuntu 18.04 is using 4.7, from what I can tell they didn't backport this patch either. |
Samba 4.8 was released too recently for it to have already entered the Debian or Ubuntu repositories. I'd be surprised if Ubuntu 18.10 didn't have it though. For what it is worth there are Ubuntu PPAs which have Samba 4.8 for installation on top of Ubuntu 18.04. |
For Debian, 4.8.0 was added to the experimental repo's not long ago. |
Will Samba 4.8 run on Ubuntu 16.04 LTS? Or will an upgrade to Ubuntu 18.04 be required? Apologies if this is the wrong place to ask. |
Sean, it will run on 16.04 but you must build it from scratch: I've written instructions on doing this at http://wa.rwick.com/2018/04/08/minimal-ubuntu-time-machine-backup-service/ |
18.04 has 4.7.6… |
That's as expected. 18.04 was in pre-release lockdown by the time samba 4.8.0 was released. Use at your own risk, but for what it is worth, adding debian experimental as an apt source in 18.04 and installing samba using apt from debian experimental seems to work just fine. |
FYI you can't install (or upgrade) debian experimental's Samba 4.8.1 on ubuntu 18.04 without also installing libnurses6 & libtinfo6 from debian sid. |
…ba:debian/dvm6 to debian/dvm6 * commit '4295a875c410809bcb1f1cd64d7e7d992eeed227': Changelog for svt22 Patch for HYP-6143 Patches for HYP-6004
Cve 2018 08 stable
Add the capability to advertise FULLSYNC volume capabilities
to clients that request them. This is mainly used for supporting
Mac OS Time Machine backups from clients. The capability does
not perform any additional action.