GithubHelp home page GithubHelp logo

docker-samba-timemachine's Introduction

docker-samba-timemachine

This is a simple time machine docker image using samba and avahi. It's mostly based on u/KervyN's HowTo and dperson's Samba docker container.

How to use this image?

Simple way

docker run -d --net=host \
            -v /opt/timemachine:/timemachine/ \
            -e TM_USER=timemachine \
            -e TM_PW=timemachine \
            --name=timemachine willtho/samba-timemachine

docker-compose

Use the provided docker-compose.yml file and create the conainer with docker-compose up -d

Environment Variables

Varibable Function Default.
TM_USER Time Machine User timemachine
TM_PW Users Password timemachine
TM_ID UserID 1000
TM_SIZE Time Machine Size in MB 512000

docker-samba-timemachine's People

Contributors

barberio avatar madbbb avatar willtho89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-samba-timemachine's Issues

Disk does not support Time Machine backups. (error 45)

Tried to modify this image to use with Raspberry Pi 3, changed the Dockerfile to use resin/armhf-alpine image and built it locally.

docker build --pull --rm --tag=timemachine .

Then ran the container.

docker run -d --net=host \
            -v /media/tm:/timemachine/ \
            -e TM_USER=timemachine \
            -e TM_PW=timemachine \
            -e TM_SIZE=350000 \
            -e TM_ID=1000 \
            --name=timemachine timemachine

Container is starting and logs are following.

docker logs -f timemachine
Added user timemachine.
2018-08-30 07:43:18,625 CRIT Supervisor running as root (no user in config file)
2018-08-30 07:43:18,647 INFO supervisord started with pid 1
2018-08-30 07:43:19,655 INFO spawned: 'smbd' with pid 18
2018-08-30 07:43:19,664 INFO spawned: 'avahia' with pid 19
2018-08-30 07:43:20,690 INFO success: smbd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-08-30 07:43:20,691 INFO success: avahia entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

From this moment I can see the SMB share with Mac Pro icon, I can mount it manually with timemachine/timemachine, I have read/write permissions to this share, but I cannot use it as Time Machine destination.

sudo tmutil setdestination "/Volumes/TimeMachine"
/Volumes/TimeMachine: Disk does not support Time Machine backups. (error 45)
The backup destination could not be set.

I guess something is wrong with avahi-daemon as healthcheck is not working properly:

CONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                      PORTS                                            NAMES
d0ec27d98c6c        timemachine                      "/tmp/setup.sh super…"   36 minutes ago      Up 36 minutes (unhealthy)                                                    timemachine
docker exec -it timemachine /bin/bash
bash-4.4# avahi-daemon -asd
avahi-daemon: unrecognized option: a

Could that issue be fixed with Dockerfile options or it depends on base image for ARM?

Second volume

Hi,

Is it possible to create secondary volume with the same container?

Dockerfile for ARM

From Doesn't start on Raspberry Pi #7:

currently the Dockerfile only supports x86_64 Platforms. changing the FROM alpine in the Dockerfile to FROM arm32v6/alpine fixes this.
To support multiple architectures different labels Dockerfiles and labels should be made available

Finder sees and mounts duplicate SMB drives

After rebuilding the image for RPi, it seemed to work but finder sees (note that I customised server name and drive name, bot):

Under both "positions" and "network" tab:
smb://Time Capsule of me_smb._tcp.local/
And after logging-in and opening the Time Capsule folder (data folder inside) osx displays two networks folder with same name and content of course, on the desktop, so a duplicate, with this same address:
smb://Time Capsule of me_smb._tcp.local/Time Capsule

at the same time, even before logging-in, the Time Machine preferences see:

"Time Capsule" drive on "Time Capsule of me.local", but if I hover the mouse it displays the address and it is:
smb://raspberrypi.local/Time Capsule

and if I chose that drive and log in, then the same preferences popup display under "other network drives" also
smb://Time Capsule of me_smb._tcp.local/Time Capsule

From the smbstats inside the container, I get:

/ # smbstatus

Samba version 4.10.8
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing              
----------------------------------------------------------------------------------------------------------------------------------------
993     timecapsule  timecapsule  192.168.1.101 (ipv4:192.168.1.101:50519)  SMB3_02           -                    -                    

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------
Time Capsule 993     192.168.1.101 Tue Nov 12 08:43:48 2019 CET     -            -           
Time Capsule 993     192.168.1.101 Tue Nov 12 08:43:48 2019 CET     -            -           

Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
993          1000       DENY_NONE  0x100081    RDONLY     NONE             /timemachine   .   Tue Nov 12 08:44:12 2019
993          1000       DENY_NONE  0x100081    RDONLY     NONE             /timemachine   .   Tue Nov 12 08:44:12 2019

/ # 

Note that the Time Machine starts and works, and this happens even with stock avahi and smb config aliases and names, no difference.

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.