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

vfs_fruit: Add capability to advertise FULLSYNC #64

Closed

Conversation

kevinanderson1
Copy link
Contributor

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.

@cgrossde
Copy link

Maybe you should mention the options needed to get time machine working:

  • durable handles = yes
  • kernel oplocks = no
  • kernel share modes = no
  • posix locking = no
  • fruit:advertise_fullsync = true

Is that correct?

@kevinanderson1
Copy link
Contributor Author

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.

@cgrossde
Copy link

cgrossde commented Nov 3, 2016

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 fruit:advertise_fullsync is true because otherwise the fullsync option is useless?

@derkostka
Copy link

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

@kevinanderson1
Copy link
Contributor Author

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

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=RackMac</txt-record>
 </service>
 <service>
   <type>_adisk._tcp</type>
   <port>0</port>
   <txt-record>dk0=adVN=timemachine,adVF=0x82</txt-record>
 </service>
</service-group>

Replace the string "timemachine" in <txt-record>dk0=adVN=timemachine,adVF=0x82</txt-record> with your share name that you want to use.

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

@derkostka
Copy link

@kevinanderson1 works well, thanks !

I will report back in case of any issues.

@derkostka
Copy link

derkostka commented Nov 6, 2016

Sorry to ask again, is there any chance to debug this options (testparm or wireshark) ?
TimeMachine let´s me select the volume, asks for the samba login, but after some timeout seconds, i get a message like "this volume doe not support nessesary options". Mac is 10.12.1 Sierra, server is Ubuntu 16.04 on an 32 bit arm

Maybe there is smth that needs to be generally adjusted in the config:

Testparm output of the related share is:

[Backup]
path = /media/sdb1
read only = No
create mask = 0775
directory mask = 0775
directory mode = 0775
fruit:advertise_fullsync = true

smb.conf

[global]
kernel oplocks = no
kernel share modes = no
posix locking = no
durable handles = yes
fruit:advertise_fullsync = true
rpc_server:mdssvc = embedded
socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
load printers = no
printcap name /dev/null
local master = Yes
min receivefile size = 16384
aio read size = 16384
aio write size = 16384
write cache size = 1024000
aio write behind = true
read raw = no
use sendfile = true
getwd cache = yes
max xmit = 65536
large readwrite = yes

Thanks !

@kevinanderson1
Copy link
Contributor Author

kevinanderson1 commented Nov 6, 2016

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

[global]
    workgroup = SAMBA
    security = user

    passdb backend = tdbsam
    durable handles = yes
    kernel oplocks = no
    kernel share modes = no
    posix locking = no  
    fruit:advertise_fullsync = true

[timemachine]
    path = /srv
    browseable = Yes
    vfs objects = catia fruit streams_xattr
    fruit:aapl = yes
    read only = No
    inherit acls = Yes

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.

screen shot 2016-11-06 at 7 44 03 am

I'll rebuild the docker container that I use for my home server later today to see if I can reproduce it as well.

@derkostka
Copy link

derkostka commented Nov 6, 2016

Perfect. Thank you very much for your support. It is doing the initial backup right now on my production environment.
What i added was:

vfs objects = catia fruit streams_xattr
fruit:aapl = yes

@elliot-wood
Copy link

elliot-wood commented Nov 11, 2016

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.

@kevinanderson1
Copy link
Contributor Author

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

@kevinanderson1
Copy link
Contributor Author

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

[global]
    workgroup = SAMBA
    security = user

    passdb backend = tdbsam
    durable handles = yes
    kernel oplocks = no
    kernel share modes = no
    posix locking = no  
    fruit:advertise_fullsync = true

[timemachine]
    path = /srv
    browseable = Yes
    vfs objects = catia fruit streams_xattr
    fruit:aapl = yes
    read only = No
    inherit acls = Yes

@joemiller
Copy link

joemiller commented Nov 13, 2016

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

@elliot-wood
Copy link

@kevinanderson1 For my first attempt, I was taking the FreeBSD samba44 port and adding the patches from this PR.

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:

[3665/3781] Linking default/source4/smbd/samba
default/source3/libmessages-dgm-samba4.so: undefined reference to `tevent_req_reset_endtime@TEVENT_0.9.31'
default/source3/libmessages-dgm-samba4.so: undefined reference to `tevent_threaded_context_create@TEVENT_0.9.30'
default/source3/libmessages-dgm-samba4.so: undefined reference to `_tevent_threaded_schedule_immediate@TEVENT_0.9.30'
default/source3/libmessages-dgm-samba4.so: undefined reference to `tevent_update_timer@TEVENT_0.9.31'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `/root/samba-bz12380-full_fsync/bin'
Build failed:  -> task failed (err #1): 
    {task: cc_link popt_common_5.o,server_9.o -> samba}
*** Error code 1

If you are using a clean installation of FreeBSD, can you detail your steps to building Samba on FreeBSD?

@derkostka
Copy link

derkostka commented Nov 13, 2016

@elliot-wood can you try and build @kevinanderson1 ´s fork on bsd or are other things changed in the source code for bsd ?
It is located: https://github.com/kevinanderson1/samba.git, you can take the correct branch there.

Overall Feedback after a week:

  • This samba release plays perfect with OSX (finally!). It is considerably faster with the finder, especially file listing got much faster.
  • Time machine backup works well. I have formatted the source partition to hfs+ now and hope that by this, the warnings "your backup consistency needs to be checked ... " are gone.
  • Can´t wait for the release.

@elliot-wood
Copy link

@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:

  • Install FreeBSD
  • Build the net/samba44 and devel/python port to pull in required build dependancies.
  • Download the ZIP of the correct branch of @kevinanderson1 's fork
  • standard ./configure, make, make install faire.

I've tried this on FreeBSD 11.0 and 10.1, to see if that'd make any difference.

@TheSkorm
Copy link

TheSkorm commented Nov 14, 2016

@elliot-wood Try this:

fetch https://www.samba.org/ftp/tevent/tevent-0.9.31.tar.gz
tar -xvf tevent-0.9.31.tar.gz
cd tevent-0.9.31
./configure
make install

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 ./configure in the samba folder before trying again.

I had issues with smbtorture compiling. It was complaining about undefined reference to ldb_unpack_data_only_attr_list_flags`` . To solve that problem (since I didn't care about smbtorture and didn't know how to prevent it from being compiled I just edited source4/torture/ldb/ldb.c and replaced every reference to `ldb_unpack_data_only_attr_list_flags(blah blah blah)` with a `0`. This will probably break things horribly when using smbtorture so I wouldn't recommend this as a proper fix.

@elliot-wood
Copy link

@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:

# ./configure --bundled-libraries=NONE
[...]
Checking for system tdb >= 1.3.11
  : not found
ERROR: System library tdb of version 1.3.11 not found, and bundling disabled.

This occurs when tdb 1.3.11 has been manually installed into /usr/local.

@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?

@enke5
Copy link

enke5 commented Nov 16, 2016

@joemiller

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.

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,
Andreas

@joemiller
Copy link

@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 /timemachine vol mount from the host, which was owned by backup:backup. I created a smbpasswd user backup inside the container. I also have a container startup script that ensure's /timemachine is chown'd to the backup user inside the container. Since both the host and the container base image are ubuntu:16.04, they each have a matching backup user with same uid.

Initially I tried to force user = nobody in the [timemachine] with the /timemachine vol also being owned by nobody but I could not get this to work. This may have been a function of samba that I am just not aware of, though.

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

@kevinanderson1
Copy link
Contributor Author

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

make clean 
./configure --without-ad-dc --without-ldap --without-ads
make -j16
make -j16 install

@enke5
Copy link

enke5 commented Nov 18, 2016

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.
Cloned samba repository and did
./configure --sbindir=/usr/sbin/ --sysconfdir=/etc/samba/ --mandir=/usr/share/man/ --bindir=/usr/bin/
make
sudo make install
After adapting the smb.conf everything seems to work now.
Thanks a lot.

@elliot-wood
Copy link

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

@kevinanderson1
Copy link
Contributor Author

@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

  • Download FreeBSD 10.1 boot-only ISO
  • pkg install git
  • git clone -b bz12380-full_fsync --depth 1 https://github.com/kevinanderson1/samba.git
  • pkg install python
  • ./configure --without-ads --without-ad-dc --without-ldap
  • make -j4
  • make -j4 install

@aaronk6
Copy link

aaronk6 commented Nov 21, 2016

@elliot-wood I ran into the same issue and could solve it by executing

pkg autoremove

Among others, this removed tevent-0.9.28 and talloc-2.1.6 which were probably left-overs from my previous Samba installation through PKG. Apparently they somehow conflicted with the linker.

Now make -j4 and make -j4 install worked fine.

@aaronk6
Copy link

aaronk6 commented Nov 21, 2016

@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 /usr/local/samba and expects its config file at /usr/local/samba/etc/smb.conf. I’ve put the following file there:

[global]
server string = Fileserver
security = user
passdb backend = tdbsam
durable handles = yes
kernel oplocks = no
kernel share modes = no
posix locking = no
fruit:advertise_fullsync = true

[timemachine]
path = /tank/time_machine
browseable = yes
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
read only = no
inherit acls = yes

I’ve then started nmbd and smbd:

/usr/local/samba/sbin/nmbd -d3
/usr/local/samba/sbin/smbd -d3

When I try connect from my Mac to smb://10.0.2.166/timemachine, I get the message There was a problem connecting to the server “10.0.2.166”. The log output on the server shows the following:

[2016/11/21 23:37:22.541768,  3] ../source3/lib/access.c:338(allow_access)
  Allowed connection from 10.0.2.105 (10.0.2.105)
[2016/11/21 23:37:22.541842,  3] ../source3/lib/access.c:338(allow_access)
  Allowed connection from 10.0.2.105 (10.0.2.105)
[2016/11/21 23:37:22.542065,  3] ../source3/smbd/oplock.c:1322(init_oplocks)
  init_oplocks: initializing messages.
[2016/11/21 23:37:22.542173,  3] ../source3/smbd/oplock.c:1322(init_oplocks)
  init_oplocks: initializing messages.
[2016/11/21 23:37:22.542835,  3] ../source3/smbd/server_exit.c:246(exit_server_common)
  Server exit (failed to receive smb request)
[2016/11/21 23:37:22.542877,  3] ../source3/smbd/server_exit.c:246(exit_server_common)
  Server exit (failed to receive smb request)
[2016/11/21 23:37:22.544616,  3] ../source3/lib/access.c:338(allow_access)
  Allowed connection from 10.0.2.105 (10.0.2.105)
[2016/11/21 23:37:22.544846,  3] ../source3/smbd/oplock.c:1322(init_oplocks)
  init_oplocks: initializing messages.
[2016/11/21 23:37:22.545045,  3] ../source3/smbd/process.c:1957(process_smb)
  Transaction 0 of length 73 (0 toread)
[2016/11/21 23:37:22.545109,  3] ../source3/smbd/process.c:1538(switch_message)
  switch message SMBnegprot (pid 49058) conn 0x0
[2016/11/21 23:37:22.545462,  3] ../source3/smbd/negprot.c:601(reply_negprot)
  Requested protocol [NT LM 0.12]
[2016/11/21 23:37:22.545536,  3] ../source3/smbd/negprot.c:601(reply_negprot)
  Requested protocol [SMB 2.002]
[2016/11/21 23:37:22.545579,  3] ../source3/smbd/negprot.c:601(reply_negprot)
  Requested protocol [SMB 2.???]
[2016/11/21 23:37:22.545997,  3] ../source3/smbd/smb2_negprot.c:290(smbd_smb2_request_process_negprot)
  Selected protocol SMB2_FF
[2016/11/21 23:37:22.548903,  1] ../lib/tdb_wrap/tdb_wrap.c:64(tdb_wrap_log)
  tdb(/usr/local/samba/var/lock/smbd_cleanupd.tdb): tdb_lock failed on list 45 ltype=3 (Invalid argument)
[2016/11/21 23:37:22.548972,  0] ../source3/lib/cleanupdb.c:74(cleanupdb_store_child)
  cleanupdb_store_child: tdb_store failed for pid 49056
[2016/11/21 23:37:22.549120,  0] ../source3/smbd/server.c:838(remove_child_pid)
  remove_child_pid: cleanupdb_store_child failed
[2016/11/21 23:37:22.549263,  1] ../lib/tdb_wrap/tdb_wrap.c:64(tdb_wrap_log)
  tdb(/usr/local/samba/var/lock/smbd_cleanupd.tdb): tdb_lock failed on list 9 ltype=3 (Invalid argument)
[2016/11/21 23:37:22.549310,  0] ../source3/lib/cleanupdb.c:74(cleanupdb_store_child)
  cleanupdb_store_child: tdb_store failed for pid 49057
[2016/11/21 23:37:22.549386,  0] ../source3/smbd/server.c:838(remove_child_pid)
  remove_child_pid: cleanupdb_store_child failed
[2016/11/21 23:37:22.626548,  3] ../lib/util/util_net.c:256(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name fileserver (flags 1026) [hostname nor servname provided, or not known]
[2016/11/21 23:37:22.626657,  3] ../source3/lib/util_sock.c:1187(get_mydnsfullname)
  get_mydnsfullname: getaddrinfo failed for name fileserver [Success]
[2016/11/21 23:37:22.711497,  3] ../lib/util/util_net.c:256(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name fileserver (flags 1026) [hostname nor servname provided, or not known]
[2016/11/21 23:37:22.711553,  3] ../source3/lib/util_sock.c:1187(get_mydnsfullname)
  get_mydnsfullname: getaddrinfo failed for name fileserver [Success]
[2016/11/21 23:37:22.711655,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'gssapi_spnego' registered
[2016/11/21 23:37:22.711718,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'gssapi_krb5' registered
[2016/11/21 23:37:22.711785,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'gssapi_krb5_sasl' registered
[2016/11/21 23:37:22.711844,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'spnego' registered
[2016/11/21 23:37:22.711892,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'schannel' registered
[2016/11/21 23:37:22.711952,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'naclrpc_as_system' registered
[2016/11/21 23:37:22.712005,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'sasl-EXTERNAL' registered
[2016/11/21 23:37:22.712052,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'ntlmssp' registered
[2016/11/21 23:37:22.712105,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'ntlmssp_resume_ccache' registered
[2016/11/21 23:37:22.712159,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'http_basic' registered
[2016/11/21 23:37:22.712217,  3] ../auth/gensec/gensec_start.c:908(gensec_register)
  GENSEC backend 'http_ntlm' registered
[2016/11/21 23:37:22.712621,  3] ../source3/smbd/negprot.c:711(reply_negprot)
  Selected protocol SMB 2.???
[2016/11/21 23:37:22.713304,  1] ../lib/tdb_wrap/tdb_wrap.c:64(tdb_wrap_log)
  tdb(/usr/local/samba/var/lock/gencache_notrans.tdb): tdb_lock failed on list 69 ltype=3 (Invalid argument)
[2016/11/21 23:37:22.713349,  1] ../lib/tdb_wrap/tdb_wrap.c:64(tdb_wrap_log)
  tdb(/usr/local/samba/var/lock/gencache_notrans.tdb): tdb_lock failed on list 69 ltype=3 (Invalid argument)
[2016/11/21 23:37:22.713397,  3] ../source3/smbd/smb2_server.c:3097(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_UNSUCCESSFUL] || at ../source3/smbd/smb2_negprot.c:271
[2016/11/21 23:37:22.714491,  3] ../source3/smbd/server_exit.c:246(exit_server_common)
  Server exit (NT_STATUS_END_OF_FILE)
[2016/11/21 23:37:22.718867,  1] ../lib/tdb_wrap/tdb_wrap.c:64(tdb_wrap_log)
  tdb(/usr/local/samba/var/lock/smbd_cleanupd.tdb): tdb_lock failed on list 106 ltype=3 (Invalid argument)
[2016/11/21 23:37:22.718910,  0] ../source3/lib/cleanupdb.c:74(cleanupdb_store_child)
  cleanupdb_store_child: tdb_store failed for pid 49058
[2016/11/21 23:37:22.719020,  0] ../source3/smbd/server.c:838(remove_child_pid)
  remove_child_pid: cleanupdb_store_child failed

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

@kevinanderson1
Copy link
Contributor Author

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

@aaronk6
Copy link

aaronk6 commented Nov 22, 2016

@kevinanderson1 Forgot to mention that but yes, I’ve run sudo /usr/local/samba/bin/pdbedit -a aaron. Logging in from another FreeBSD machine with smbclient -U aaron //10.0.2.166/timemachine works fine and it shows me the directory contents when executing ls. So I think it isn’t a user or permission issue. It’s just that macOS and Windows clients won’t connect.

@ghost
Copy link

ghost commented Dec 4, 2016

Can I chip in into this? I'd like to see a small modifications
I'd like it to be able to set the maximum size of the backup in a vfs:fruit attribute. This same functionality was available in netatalk, and I also don't think it's a quota - I have a osx server instance, and Finder (and the TM prefpane intially) report the full size of the drive, but when starting a backup, TM obeys the max size limit set in osx server properties for timemachine. I wouldn't begin to know what magic bits they use to signal that, but I can provide pcaps, and maybe the netatalk authors know something too.

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)

@joemiller
Copy link

@elfhack It would be great if we could set a limit like that for the time machine share. Maybe the global dfree config option could be used in the meantime?

@sitsofe
Copy link

sitsofe commented Oct 6, 2017

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.

@omor1
Copy link
Contributor

omor1 commented Oct 6, 2017

@senthor @sitsofe yes, the patches were merged a couple days ago. I suspect that we won't see this in stable until 4.8.0 though.

@slowfranklin
Copy link
Contributor

slowfranklin commented Oct 6, 2017 via email

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>
@sitsofe
Copy link

sitsofe commented Oct 26, 2017

Should this pull request be closed now the code is merged?

@sitsofe
Copy link

sitsofe commented Oct 26, 2017

Also, does this mean https://bugzilla.samba.org/show_bug.cgi?id=12380 has been fixed?

@yangm97
Copy link

yangm97 commented Oct 26, 2017

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.

@sitsofe
Copy link

sitsofe commented Oct 26, 2017

@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
Copy link
Contributor

slowfranklin commented Oct 26, 2017 via email

@sitsofe
Copy link

sitsofe commented Oct 26, 2017

@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?

@slowfranklin
Copy link
Contributor

slowfranklin commented Oct 26, 2017 via email

@msklvsk
Copy link

msklvsk commented Oct 30, 2017

Does this just fake full sync or does it actually perform it?
What are the risks of not implementing the command?

@sitsofe
Copy link

sitsofe commented Oct 30, 2017

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

@derkostka
Copy link

Works perfectly, i just compiled samba 4.8 pre, thanks a lot !

@Henrik41
Copy link

I am a bit disoriented and new at this. I have an Ubuntu 16.04 (LTE) with samba 4.3.11-Ubuntu
I need to install this patch to use samba for my Time machine but don't know where to go from there. Any help is welcome.

@andrewmiskell
Copy link

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

@iliv
Copy link

iliv commented Jan 6, 2018

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

@kudos
Copy link

kudos commented Mar 18, 2018

It looks like Ubuntu 18.04 is using 4.7, from what I can tell they didn't backport this patch either.

@satmandu
Copy link

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.
e.g. https://launchpad.net/~linux-schools/+archive/ubuntu/samba-latest

@marcosatti
Copy link

For Debian, 4.8.0 was added to the experimental repo's not long ago.

@SeanHood
Copy link

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.

@warwickchapman
Copy link

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/

@msklvsk
Copy link

msklvsk commented Apr 29, 2018

18.04 has 4.7.6…
https://launchpad.net/ubuntu/bionic/amd64/samba

@satmandu
Copy link

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.

@satmandu
Copy link

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.

abmas pushed a commit to abmas/samba that referenced this pull request Jun 20, 2018
…ba:debian/dvm6 to debian/dvm6

* commit '4295a875c410809bcb1f1cd64d7e7d992eeed227':
  Changelog for svt22
  Patch for HYP-6143
  Patches for HYP-6004
mattiasa pushed a commit to mattiasa/samba that referenced this pull request Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet