Commit 4574dc7e authored by Marvin Winkler's avatar Marvin Winkler

added TimeMachine Support

parent ca0dd771
# samba # samba
samba - freshly complied from official stable releases on debian:jessie samba - freshly complied from official stable releases on debian:stretch
# Source Code # Source Code
Check the following link for a new version: https://download.samba.org/pub/samba/stable/ Check the following link for a new version: https://download.samba.org/pub/samba/stable/
...@@ -25,6 +25,13 @@ to restrict access of volumes you can add the following to your samba volume con ...@@ -25,6 +25,13 @@ to restrict access of volumes you can add the following to your samba volume con
* __SAMBA\_CONF\_MAP_TO_GUEST__ * __SAMBA\_CONF\_MAP_TO_GUEST__
* default: _Bad User_ * default: _Bad User_
* __SAMBA\_CONF\_ENABLE\_TIMEMACHINE__
* default not set - if set Apple's SMB2+ extension is enabled and timemachine support activated
* __SAMBA\_CONF\_TIMEMACHINE\_MAX\_SIZE__
* default not set - if set it limits global disk size and preventing Time Machine from using the whole real disk space for backup
* format: `SIZE [K|M|G|T|P]`
* __SAMBA\_CONF\_ENABLE\_PASSWORD\_SYNC__ * __SAMBA\_CONF\_ENABLE\_PASSWORD\_SYNC__
* default not set - if set password sync is enabled * default not set - if set password sync is enabled
......
...@@ -9,7 +9,7 @@ services: ...@@ -9,7 +9,7 @@ services:
ACCOUNT_alice: alipass ACCOUNT_alice: alipass
ACCOUNT_bob: bobpass ACCOUNT_bob: bobpass
SAMBA_VOLUME_CONFIG_aliceonly: "[Alice Share]; path=/shares/alice; valid users = alice; guest ok = no; read only = no; browseable = no" SAMBA_VOLUME_CONFIG_aliceonly: "[Alice Share]; path=/shares/alice; valid users = alice; guest ok = no; read only = no; browseable = no"
SAMBA_VOLUME_CONFIG_bobstm: "[TimeCapsule Bob]; path=/shares/timemachine; valid users = bob; guest ok = no; read only = no; browseable = yes" SAMBA_VOLUME_CONFIG_bobstm: "[TimeCapsule Bob]; path=/shares/timemachine; valid users = bob; guest ok = no; read only = no; browseable = yes; fruit:time machine = yes; fruit:time machine max size = 500G;"
volumes: volumes:
- ./shares/alice:/shares/alice - ./shares/alice:/shares/alice
- ./shares/timemachine:/shares/timemachine - ./shares/timemachine:/shares/timemachine
......
...@@ -50,6 +50,28 @@ cat > /etc/smb.conf <<EOF ...@@ -50,6 +50,28 @@ cat > /etc/smb.conf <<EOF
EOF EOF
##
# Apple's SMB2+ extension timemachine support activated
##
if [ ! -z ${SAMBA_CONF_ENABLE_TIMEMACHINE+x} ]
then
echo ">> SAMBA CONFIG: \$SAMBA_CONF_ENABLE_TIMEMACHINE is set, enabling Apple's SMB2+ & timemachine"
cat >> /etc/smb.conf <<EOF
# Apple's SMB2+ & timemachine
fruit:aapl = yes
fruit:time machine = yes
EOF
if [ ! -z ${SAMBA_CONF_TIMEMACHINE_MAX_SIZE+x} ]
then
echo ">> SAMBA CONFIG: \$SAMBA_CONF_TIMEMACHINE_MAX_SIZE is set to $SAMBA_CONF_TIMEMACHINE_MAX_SIZE"
cat >> /etc/smb.conf <<EOF
fruit:time machine max size = $SAMBA_CONF_TIMEMACHINE_MAX_SIZE
EOF
fi
fi
## ##
# SAMBA Configuration (enable NTLMv1 passwords/auth) # SAMBA Configuration (enable NTLMv1 passwords/auth)
## ##
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment