Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Let Time Machine backup File Vault while logged in ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Let Time Machine backup File Vault while logged in
Authored by: chucky23 on Apr 29, '10 07:58:59AM

OK, Wolfgang123, I think I have an actual SOLUTION here.

We're going to solve the "Is there a way to reduce the "logical size" of the sparse image; so to not confuse TimeMachine?" aspect.

First of all, here's the background as I have managed to semi-learn over the past 24 hours:

- When you create a FileVault account, the system gives it a "Capacity" of twice the size of the physical disk it sits upon. (That's why your FV account shows a capacity of 1TB, since your physical disk is 500GB.)

- The FV account calculates a "Used" size of "Capacity" - "Available". "Available" is either the amount of free space available on your physical disk or the amount of free space available on the sparsebundle, whichever is smaller. Since the sparsebundle is created with a larger amount of free space than the physical disk, normally the "Used" size is the "Capacity" - Free space on the physical drive. In your situation, your FileVault account reports 800GB as "Used" since the FV "Capacity" is 1TB, and I'd guess you have 200GB of free space on your physical drive. So 1TB - 200GB = 800GB "Used".

- TimeMachine (when misused according to this Hint) respects the "Used" value of a FileVault account when it checks to see if it has enough space on the backup drive.

-----

So, here is the solution.

FIRST OF ALL, MAKE SURE YOU DO A GOOD BACKUP PRIOR TO PROCEEDING. This is a hacky solution, that I've only begun to really test. It does seem to work, but you should be prepared for it not to work, and to be able to restore your hard drive if it doesn't work for you.

- Logout of your FileVault account.

- Log into a second admin account to do the work.

- Mount your FileVault sparseimage. (There are a hundred different ways to do this. Search google. My method is to launch Disk Utility from the terminal through sudo.)

- Issue the following command in Terminal (replace "username" with your FileVault username. replace "500" with the Capacity you want your FileVault to now have in gigabytes):

diskutil resizeVolume /Volumes/username 500g

- Unmount your FileVault sparseimage. (You can just eject from the Finder.)

- Logout of your second admin account and log back into your FileVault account.

- Voila.

-----

The trickiest thing here is in determining the "Capacity" you want for your FileVault image.

Obviously, this will serve as a maximum for the data you can put in the FileVault.

Assuming you set it to 500GB, since the FV account calculates it's "Used" size as "Capacity" - "Available", it should show a "Used" value of 300GB, which is what Time Machine will now check for to backup the drive.

Now, if you set the "Capacity" to 180GB, then "Used" will show up as your genuine 150GB, since your available on the sparsebundle is now less than the available on the physical hard drive, and Time Machine will now only check for that 150GB.

Happily, you can repeat the steps about to resize your "Capacity" if you find you've guessed wrong. For a first try, you might want to think about a value of perhaps 250GB...



[ Reply to This | # ]
10.6: Let Time Machine backup File Vault while logged in
Authored by: chucky23 on Apr 30, '10 07:30:23PM

48 hours in, and the "Re-Capacity" measure is working with flying colors on my rig.

Multiple backups, multiple restores, and all works well.

And you can repeat the above steps to change your FV images capacity, both up and down.

-----

While it is hacky, I can't see a situation where it'd cause any real problems. The only exception is if Apple were to change FV methods in 10.7, but that won't be out for a year, and even if it does, you can just toggle FV off/on to restore to Apple factory defaults of FV capacity.

-----

In short, I recommend this method, should you wish to follow the trick but run into the false "Capacity" issue on a FV volume.

As always, I wouldn't count on this as a full backup solution. I use TM as above to backup my logged in FV, but then I backup with CCC twice a month when logged out of my FV account.

That gives me the TM backups when logged into FV, the starfield UI to examine, archive, and restore my FV volume, and also give me a FULL CCC close suitable for instant full restore in the event of things going blooey. (Then you'd have to manually restore your more recent FV logged in TM to overwrite the older FV items.

The only problem I still can 't work around is the insecurity of the encrypted image I make for FV login backups. The disk image key is stored in the System keychain, which is a bit security hole. I'll work for a bit on seeing if there is some workaround this one.



[ Reply to This | # ]