mbentley / docker-timemachine

Docker image to run Samba (compatible Time Machine for macOS)
Apache License 2.0
527 stars 65 forks source link

[Bug/Help]: Connecting to USB Drive #157

Closed metaljay closed 6 months ago

metaljay commented 6 months ago

Describe the Bug

Hi, really sorry to have to raise an issue, for the life of me I can't work out how to get my external USB drive to be visible correctly. I didn't want to create a new account for Time Machine, just use my stand 'pi' login.

I have installed the image correctly, it runs and I see this comment in the logs NFO: INFO: CUSTOM_SMB_CONF=false; generating [TimeMachine] section of /etc/samba/smb.conf... Failed to add entry for user “pi”. Failed to find user “pi” in passdb backend. INFO: Samba - Created INFO: Samba - INFO: Samba - setting password Failed to find entry for user “pi”. INFO: SET_PERMISSIONS=false; not setting ownership and permissions for /opt/“pi” INFO: Avahi - completing the configuration in /etc/avahi/services/smbd.service... INFO: running test for xattr support on your time machine persistent storage location... INFO: xattr test successful - your persistent data store supports xattrs INFO: Detected filesystem for /opt/pi is ext4 WARN: Detected filesystem for /opt/“pi” is overlay! This likely means that your data is being stored inside the container, not in a volume! See https://github.com/mbentley/docker-timemachine#persistent-data-path

I have ran this command from the pi: docker run -d --restart=always --name timemachine --net=host -e TM_USERNAME=“pi” -e TM_GROUPNAME=“pi” -e PASSWORD=“TEST123” -e TM_UID="1000" -e TM_GID="1000" -e SET_PERMISSIONS="false" -e VOLUME_SIZE_LIMIT="0" -v /media/timemachine:/opt/pi --tmpfs /run/samba mbentley/timemachine:smb

what should I change to -v to call up the drive? When I try to connect to the timemachine from Mac im asked to enter password etc but nothing works, pi, time machine or my Mac login.

here is what ive done:

sudo mkfs -t ext4 /dev/sda sudo mkdir /media/timemachine sudo chown -R 777 /media/timemachine sudo chown pi:pi /media/timemachine ls -lha /dev/disk/by-uuid sudo nano /etc/fstab UUID=3aac30eb-364e-4e24-a5f7-eec2ea12fa62 /media/timemachine ext4 sync,noexec,nodev,noatime,nodiratime 0 0

Expected Behavior

As above

Steps to Reproduce

N/A

How You're Launching the Container

As above

Container Logs

as above

Time Machine client Logs

n/a

Additional Context

No response

mbentley commented 6 months ago

You have weird quote symbols that are not actually quotes in your docker run... command. See the difference? “pi” vs "pi"

I did a find/replace so give this a shot:

docker run -d --restart=always --name timemachine --net=host -e TM_USERNAME="pi" -e TM_GROUPNAME="pi" -e PASSWORD="TEST123" -e TM_UID="1000" -e TM_GID="1000" -e SET_PERMISSIONS="false" -e VOLUME_SIZE_LIMIT="0" -v /media/timemachine:/opt/pi --tmpfs /run/samba mbentley/timemachine:smb
metaljay commented 6 months ago

You have weird quote symbols that are not actually quotes in your docker run... command. See the difference? “pi” vs "pi"

I did a find/replace so give this a shot:

docker run -d --restart=always --name timemachine --net=host -e TM_USERNAME="pi" -e TM_GROUPNAME="pi" -e PASSWORD="TEST123" -e TM_UID="1000" -e TM_GID="1000" -e SET_PERMISSIONS="false" -e VOLUME_SIZE_LIMIT="0" -v /media/timemachine:/opt/pi --tmpfs /run/samba mbentley/timemachine:smb

that literally is it, I have no idea why or how im using different quote symbols??? works as intended now.

Thanks for such a quick response :)