Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dp84

macrumors member
Original poster
Aug 14, 2010
51
0
Hi :)

I'm trying to setup a time machine backup over the network with the following command:

Code:
sudo tmutil setdestination -p afp://<username>@<host>/<share>

this works perfectly
- it auto-set the network drive as time machine target drive
- it works automatically without the need to mount the afp share and the sparsebundle volume manually

The problem is that the sparsebundle image created (automatically) in the network share has the same size of the available size of the (remote) hard drive and there is no way to specify a manually created image with specific size (e.g. 500GB)

any idea? :confused:
 
RE: Create the sparsebundle first...

Hi :)

I'm trying to setup a time machine backup over the network with the following command:

Code:
sudo tmutil setdestination -p afp://<username>@<host>/<share>

this works perfectly
- it auto-set the network drive as time machine target drive
- it works automatically without the need to mount the afp share and the sparsebundle volume manually

The problem is that the sparsebundle image created (automatically) in the network share has the same size of the available size of the (remote) hard drive and there is no way to specify a manually created image with specific size (e.g. 500GB)

any idea? :confused:

Hi dp84,

I believe that if you create the sparsebundle first then it will have the size you want. The following instructions I used under an earlier version of Mac OS X, so I don't know positively that they work under 10.8.3, but I suspect that they do.

First make sure that TM will recognize the network drive (the network drive should also be formatted as HFS+J:

Code:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Make a sparsebundle with the proper naming scheme for TM (FQDN is the Fully Qualified Domain Name pertinent to your network; it may be something like "machine name.local") (MAC is your MAC address found using "ifconfig" but without the colons, something like 20C9D3AF3145):

Code:
hdiutil create -size 300g -fs HFS+J -volname "Time Machine" FQDN_MAC.sparsebundle

(Note: I now notice that TM may now use a different naming scheme for the sparse bundle ... since you already created one with your above tmutil command, use the same name in the above hdiutil command to create the new sparsebundle of the size you want.)

The above "hdiutil" command creates a sparsebundle that is 300 GB in size; change the 300g to whatever you wish to use.

Copy your new sparsebundle to the network drive, then delete the local copy:

Code:
rsync -aE FQDN_MAC.sparsebundle /Volumes/My-network-volume
rm -rf FQDN_MAC.sparsebundle

where "My-network-volume" is the name of your network storage drive.

You can now either open the TM Preference pane of System Preferences and "Add or Remove Backup Disk.." to select your network disk for TM use and TM will backup to the sparsebundle, or you can use the "tmutil" command that you used earlier to set the destination to the new network volume. You can use use the "tmutil inheritbackup" command to specify which sparsebundle TM should use.

Good luck,
Switon
 
Hi switon, thank you for the answer.

I already tried to create the sparsebundle by myself but if I use

Code:
sudo tmutil setdestination /Volumes/MyVolumeName

The backup does not work when the afp share is not connected and the volume is not mounted.

I tried to put the sparsebundle in the directory which I specified in the command

Code:
sudo tmutil setdestination -p afp://<username>@<host>/<share>

but Time Machine ignore my sparsebundle and creates a new one

I also tried to create a sparsebundle with specific name (hostname_mac.sparsebundle) and this was funny because Time Machine used my sparsebundle but he modified the size and the name :eek:

I really have no more ideas to try but I can't believe this is a "limit"...
 
Similar Issue

I'm working that issue as well. We're setting up a situation in our department where our customers can just back up their desktop and documents folders to the sparsebundle. Our bundle sizes are coming in at around 5 to 7GB.

I'm having an issue where I can't delete the sparsebundle from the server. Getting an error message that "File 0 is in use". Wondering if this is a diskutility issue or a time machine one....
 
RE: tmutil inheritbackup...

Hi,

Did you try to "tmutil inheritbackup" your sparsebundle? This should allow you to select the actual sparsebundle to use by TM. (Of course, it requires root privileges.)

Good luck,
Switon
 
Hi,

Did you try to "tmutil inheritbackup" your sparsebundle? This should allow you to select the actual sparsebundle to use by TM. (Of course, it requires root privileges.)

Good luck,
Switon

inheritbackup does not do anything (actually) without the setdestination command and at that point I have the same problems as before...
 
RE: inheritbackup

Hi dp84,

I just tried to create and inherit a local sparsebundle, but without luck. This is funny since I have used "inheritbackup" in the past to inherit network backups. I'll have to look into this further.

Regards,
Switon
 
tried also

Code:
defaults write /Library/Preferences/com.apple.TimeMachine MaxSize <size>

and

Code:
defaults write com.apple.TimeMachine MaxSize <size>

with no effect.. :(
 
RE: partition...

If all you are after is limiting the size of the TM backup to something less than the volume size, why not just create a partition of the size you require and set TM to backup to this partition. The partition will thus limit the TM backup to this size.

Switon
 
If all you are after is limiting the size of the TM backup to something less than the volume size, why not just create a partition of the size you require and set TM to backup to this partition. The partition will thus limit the TM backup to this size.

Switon

Hi Switon,

I can't because on the same network drive I have about 50 users (obviously each one with his own "network backup folder")

Unfortunally Time Machine sees the entire drive (16TB) ...
 
I found the solution :eek:

You have to install XCode + Command line tools to get SetFile utility, then run

Code:
SetFile -a L /Your/Network/Path/img_name.sparsebundle/Info.*

to lock the Info.* files and avoid the auto image resizing


YESSSSSS :D

Thank for the support ;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.