How to Wirelessly Back Up Your Mac to a Windows Computer Using Time Machine
If you'd like to back up your Mac to USB drive plugged into another computer on your local network while still being able to use the USB to store other files, follow these steps to do so. Anything in red is important!
Creating the Sparse Bundle Disk Image File in Disk Utility:
First, you will need to connect the USB drive to your Mac and then open Disk Utility. You can do this by pressing ⌘ + Space and searching for it. Once opened, click "File" in the Menu Bar and navigate to "New Image" > "Blank Image", or just press ⌘ + N on your keyboard. There will be some fields that you will need to fill out. Below you will see what you should type/select for them all. Leave it as blank/default if not specified below.
Save As and Name: Any name that is preferably all one word.
Where: The USB drive.
Size: Choose how much storage on the USB drive you would like to allocate to Time Machine. For instance, if you have a 64 GB USB drive, you may want to keep 12 GB separate from Time Machine, so you would type "50 GB" in the box.
Format: macOS Extended (Journaled).
Encryption: 128-bit AES encryption (recommended). Then you will need to create a password. Do not forget this password.
Image Format: Sparse bundle disk image. This is not to be confused with "Sparse disk image".
Make sure that the "Size" box hasn't been reset, and then click "Save". Wait for the process to complete.
Allowing the Connection From Your Windows PC to Your Mac:
Once done, plug the USB drive into the Windows computer you wish to connect to over the network. On the Windows computer, open File Explorer and right-click the USB drive and click "Properties". In the "Sharing" tab click "Advanced Sharing..." and enter your administrator password if prompted. Ensure "Share this folder" is ticked and then click "Permissions". In the next dialog box, select all of the users listed, apart from yourself, and click "Remove". If your own user account wasn't listed, you need to add it to the list by clicking "Add..." and then type your username into the box towards the bottom of the window, and press enter. It should automatically fill it with your full name if you have spelt it correctly. Next, click "OK" to close the window. You will be taken back to the previous window, in which you need to tick all of the boxes under the "Allow" column and then click "OK" twice and then "Close" to close all of the windows.
Next, you need to open the start menu and type "CMD" and press enter. A Command Prompt window will open. In this window, you need to type "ipconfig" and press enter. A list of network information will open, and if you look to the right of "IPv4 Address", you will see an IP address.
Getting Your Mac Connected to the USB Drive Wirelessly:
On your Mac, open Finder and click the "Go" menu at the top and choose "Connect to Server", or press ⌘ + K, and then type "smb://18.104.22.168". Replace this IP address with the IPv4 address listed in Command Prompt on the Windows computer. After you have typed this in on your Mac, press enter. In the dialog box that will appear, select the drive letter which corresponds to the USB Drive on the Windows PC and then proceed to connection. The drive letter can be found in File Explorer next to the name of the USB drive.
Once your Mac is connected, you will see the USB drive listed under "Locations" in the Finder sidebar, even though it is not physically connected to the Mac. It is now being accessed over your local network. You can place whatever files you want on the USB drive just by dragging it into it.
Next, click the USB drive to open it from the Finder sidebar and you will see the Sparse Bundle Disk Image file you created earlier. Double click it and you will be asked for the password you created in Disk Utility near the beginning of this tutorial. Once you have entered the password, tick the "Remember password in my keychain" box if you do not want to be asked for the password again on this specific Mac, and then click "OK". You will now see the Sparse Bundle Disk Image file listed as a 2nd location in the Finder sidebar. Do not place any files in here — let Time Machine do the work. It is fine to store files outside of this Sparse Bundle Disk Image file on the USB drive though.
Telling Your Mac to Back Up to the Right Place:
Now you need to tell your Mac that you would like to backup to this drive via Time Machine. To do this, open Terminal. You can do this by pressing ⌘ + Space and searching for it. Type in to the Terminal window "sudo tmutil setdestination /Volumes/TheNameOfYourTimeMachineBackupDrive" and press enter. Replace "TheNameOfYourTimeMachineBackupDrive" with the name of the Sparse Bundle Disk Image file you mounted earlier. If you added spaces to the name, you can refer to spaces as "%20" when running this command.
Finally, open System Preferences and click "Time Machine". You should see that the Time Machine destination has now been changed to the desired location. If not, click "Select Disk..." and choose the Sparse Bundle Disk Image file from the list of disks, and then select "Use Disk".
Initiating Your First Backup (The Fun Part!):
Now you can click "Show Time Machine in menu bar" towards the bottom of the window, click the Time Machine icon in the menu bar and click "Back Up Now".