Create an Apple Time Capsule for free with VMware Photon

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.

182246-apple-time-capsule-top-front

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

Login to your Photon VM and type the following command and press enter to start the Docker service

systemctl start docker

Now type the following and press enter so Docker always starts when the VM is powered on

systemctl enable docker

Now let’s create a directory to store the time machine backups

Now let’s get the time machine image from Docker hub. Type the following and press enter

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

 

Press esc and then Shift ZZ to save the file

Type the following and press enter to start the container with the script file

Type docker ps to make sure the container is running

Open Finder and press Command K and enter the address to your Photon VM like below

Enter the user name and password you set in the script file we created earlier and click connect

Open time machine preferences and select the Backup disk we just connected

Turn on time machine and enjoy!

Remember, sharing is caring ->Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
0Share on LinkedIn
Linkedin
Email this to someone
email

9 Replies to “Create an Apple Time Capsule for free with VMware Photon”

  1. Pingback: Apple Time Capsule as a Service with vRA/vCAC and VMware Photon | VMtoCloud.com

  2. 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.

  3. 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?

  4. 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?

  5. 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.

  6. 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?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.