True story, recently my car was broken into and my Mac Book was stolen. Not a total loss as I keep most of my files synced to VMware Horizon data. However I did invest a lot of time setting up my Mac just the way I like it. So it dawned on me that I should probabaly start backing up my Macs. I looked into a Time Capsule from Apple and they are not cheap. Around $300. Essentialy it is just a network attached drive so I started researching if I could just create one. Here are those results.
Disclaimer:
This guide uses open source solutions and comes with no guarantee, warranty or support from myself, VMtocloud.com or VMware. Use at your own risk.
First, you will need to install Photon on either an additional Mac with Fusion or if you have vSphere on your network you will need to install it in a Virtual Machine. Make sure the Photon VM you create has enough disk space to back up your MAC
How to install Photon on a Mac with Fusion https://vmware.github.io/photon/assets/files/getting_started_with_photon_on_vmware_fusion.pdf
How to install Photon on vSphere https://vmware.github.io/photon/assets/files/getting_started_with_photon_on_vsphere.pdf
systemctl start docker
systemctl enable docker
Now lets create a shell script that starts the container with some additional parameters, change to the root directory then open the vi editor by typing vi startcapsule.sh
Press i to change to insert mode and enter the following, keep in mind you will need to change the IP address to match that of the Photon VM. Also you will want to set the AFPD_Login name and password.
docker run -d -p 192.168.100.128:548:548 -v /mybackups:/share \ -e AFPD_LOGIN=rkelly -e AFPD_PASSWORD=VMware1! \ -e AFPD_NAME="Backup" -e AFPD_SIZE_LIMIT=8000 \ --name TimeCapsule bobrik/time-container
Pingback: Apple Time Capsule as a Service with vRA/vCAC and VMware Photon | VMtoCloud.com
Thanks for the instructions When I restart the system and try and run the shell script again to start it I get an error that TimeCapsule is already in use by container…
How do you start it up again on reboot? When I do a docker ps after the reboot doesn’t show running yet get the above.
i get a backup image could not be created when starting backup. am i supposed to create a sparsebundle? am i supposed to run the command to allow to backupto netwoek shares?
Hey, so this worked really well!
I’d like to get two partitions up and running… an extra one for my wife. How would I go about this?
This worked for me for a while then for no reason I could not write to the backup folder
Many thanks for the tutorial. This was exactly what I was looking for. However, when running the the script “timecapsule.sh”, which appeared to work, I then ran “docker ps” to check it was running but found that the container was not running. I realise this thread is years old does anyone know what my be the issue? I’ve ran into similar issues as John but I’m able to remove the container using the “rm docker” command. Any help would be much appreciated as it would be a very neat solution and a great project.
Works as described, but it only tells me i have 8,39GB of free space – unless my ESXi has more than 10TB of space for that machine. Whats the mistake?
Just remove “-e AFPD_SIZE_LIMIT=8000”
Works like a charm, thank you ! 🙂
Great blog, awesome idea for a home timemachine backup across the local LAN. Any suggestions how to make backups from cleaning themselves up? I keep having to delete my backups, as TM doesn’t seem to do it on it’s own. The backups don’t seem to clean up if disk space is getting low. Have had this happen numerous times, Had to delete the backup, then recreate a brand new backup. Any suggestions or changes?