Git Product home page Git Product logo

Comments (5)

MarvAmBass avatar MarvAmBass commented on July 17, 2024

I, thanks for using my container and writing this bug record.

Really strange, could you please provide your docker-compose.yml (make sure to delete passwords and personal data)?

If you look on how this is written, it will only add the whole service if no 'dk' is found. after that, every other timemachine, will be integrated inside this service-tag using a sed replacement.
I don't really understand why the </service-group> was missing in the first place...

ohh okay I found it - https://github.com/ServerContainers/samba/blob/master/scripts/entrypoint.sh#L85 deletes </service-group>. so this should only be run the first time a timemachine volume is recognized. I'll create a fix and push it asap.

Thanks for reporting this bug! 👍 Have fun with the container!

P.S. I found your project as one of the easiest to adapt as a TimeMachine Samba container. thanks, but didn't it work out of the box - did you need other improvements for it to work?

from samba.

MarvAmBass avatar MarvAmBass commented on July 17, 2024

fixed

from samba.

openfirmware avatar openfirmware commented on July 17, 2024

Here is the docker-compose.yml.

I have a few MacBooks I was upgrading/moving and wanted to try this Dockerfile as a way of giving each their own set of user/pass and isolated shares.

I am using macvlan as I wanted to test it out alongside the Samba/Avahi already running on the Docker host, and having the container act as a new network device seems to work. I haven't tested ipv6 as I haven't set it up on my home network yet, maybe one day.

The shares are on a ZFS pool, each share being it's own ZFS filesystem with its own quota set. This quota is then seen by the container as the amount of space available and is passed along to Time Machine clients.

I don't know if the vfs objects = fruit streams_xattr; on each volume config is necessary, I added that while I was trying to get it working before I noticed the Avahi config bug. I copied that stanza from the Time Machine Samba setup I have on the Docker host for my older Mac computer.

# Tested with Docker Engine 19.03.14
# Version 2 is used, as I found it easier to understand the documentation without the Docker Swarm options in Version 3
version: '2.4'

services:
  samba:
    image: servercontainers/samba
    
    networks:
      smb_macvlan:
        ipv4_address: 10.0.1.55

    restart: unless-stopped

    environment:
      AVAHI_NAME: 'My TimeCapsule'
      MODEL: 'TimeCapsule'

      ACCOUNT_device_A: "deviceAPass"
      ACCOUNT_device_B: "deviceBPass"
      ACCOUNT_device_C: "deviceCPass"

      SAMBA_VOLUME_CONFIG_device_A: "[TimeCapsule Device A]; path=/shares/device_a; valid users = device_A; guest ok = no; read only = no; browseable = no; fruit:time machine = yes; vfs objects = fruit streams_xattr;"
      SAMBA_VOLUME_CONFIG_device_B: "[TimeCapsule Device B]; path=/shares/device_b; valid users = device_B; guest ok = no; read only = no; browseable = no; fruit:time machine = yes; vfs objects = fruit streams_xattr;"
      SAMBA_VOLUME_CONFIG_device_C: "[TimeCapsule Device C]; path=/shares/device_c; valid users = device_C; guest ok = no; read only = no; browseable = no; fruit:time machine = yes; vfs objects = fruit streams_xattr;"

    volumes:
      - "/myzpool/backup/device_a:/shares/device_a"
      - "/myzpool/backup/device_b:/shares/device_b"
      - "/myzpool/backup/device_c:/shares/device_c"

networks:
  smb_macvlan:
    driver: macvlan
    enable_ipv6: false
    driver_opts:
      parent: br0
    ipam:
      driver: default
      config:
        - gateway: 10.0.1.1
          subnet: 10.0.1.0/24

Hope this helps anyone trying the same. 👍

from samba.

MarvAmBass avatar MarvAmBass commented on July 17, 2024

I thinks for the explanation, I also saw a very interesting setup you might be interessted in: https://github.com/sp00ls/SambaConfigs
He is using one timemachine share which points to a user specific one (I was thinking about implementing this feature into this container somehow... but I'm not sure how to do it in a proper way that people understand how to use it)

regarding your samba configs, you can just remove the vfs objects = fruit streams_xattr;-part since my entrypoint script adds this as soon as it recognizes a time machine = yes in your config - so you don't need to worry about other settings than this one.

thanks for you config :), and also nice to see, that multiple timemachine volumes are possible on one server (I implemented it that way, but never tested it, since I only need one TS volume) and kind regards

from samba.

MarvAmBass avatar MarvAmBass commented on July 17, 2024

Just a small info - I just finised the multi user mode. you can now add a single timemachine path like ...; path = /shares/timemachine/%U; ... and samba will create subfolders for each user and present the individual folder to each user 😁
maybe this can help to cleanup your samba config

from samba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.