The DLeo

What it's all about

Category: Mac

Time Machine Backup to a Windows Network Share

After quite a bit of searching I found the instructions below that allowed me to do a Time Machine backup to a Windows Share.

First create the sparse bundle disk image

1. In Disk Utility, click on New Image.
2. For Name, name it anything you want. I would recommend only using alpha numeric characters and no spaces.
3. The size doesn’t matter for now.
4. Format is Mac OS Extended (Journaled)
5. I didn’t encrypt mine, but apparently you can if you want.
6. Lastly for Image Format select “sparse bundle disk image”

Next, resize the sparsebundle file.
1. Unmount the sparsebundle.
2. Open terminal and type the following command (replacing the size and path with your specific info.

 Bash | 
 
 copy code |
?

1
hdiutil resize -size 100g /path/to/MyBackup.sparsebundle

Now, copy the sparsebundle file to your server share.

Use the following instructions to tell Time Machine to use your new .sparsebundle file.
1. In Finder, navigate to the shared folder where you copied the sparsebundle file.
2. Double click the sparsebundle file to mount it.
3. In Terminal, type the following:

 Bash | 
 
 copy code |
?

1
sudo tmutil setdestination /Volumes/MyBackup
2

Replace MyBackup with the name of the disk image. You can get the name of the image from either the side bar in the Finder or run this from the Terminal:

 Bash | 
 
 copy code |
?

1
ls -al /Volumes

You should be ready to backup now. Go to Time Machine and select Backup Now. You can also go to Time Machine Preferences and select which folders you want to exclude.

Good Luck!

Fix Corrupted Time Machine Backup on WHS Share

This post is for my own reference, but if it helps you, all the better. My Mac is configured to backup to a share on my Windows Home Server. The sparsebundle became corrupted and this is how I was able to repair it. Instructions for setting up Time Machine Backups to a Network Share are here.

First, connect to the share using the account that you use to back up.

Next, attach the image without mounting it using hdiutil:

 Bash | 
 
 copy code |
?

1
hdiutil attach -nomount -readwrite /Volumes/OSX/MyBundleName.sparsebundle

Finally, run fsck_hfs on the main volume:

 Bash | 
 
 copy code |
?

1
fsck_hfs -rf /dev/disk1s2

© 2018 The DLeo

Theme by Anders NorenUp ↑