|
|
How to delete files in a Time Machine backup through the terminal
I could not find a good way to disable the ACLs on the backup volume, and since the entire backup set is set to prevent everybody from deleting it (even as root), I suppose to protect the user, it is not possible to manually delete this data. However, if you know what you are doing and want to override this:
Code:
sudo fsaclctl -p /Volumes/<yourVolume> -dCode:
sudo rm -rfYou can use the GUI to delete backup sets as well, but I intend to run scheduled scripts to automate deleting old backups in order to keep the number of files and disk usage on the drive down... |
Why not just create a partition the size you want Time Machine to use, and let it manage the space? I guess I'm not sure what you're trying to achieve here.
|
I don't want to repartition my disk, and since multiple machines will be backing up to this partition I want more flexibility and want to utilize my disk space as best as I can. I don't think it is possible to shrink partitions, only grow them, right? In order to grow them, there needs to be some unutilized space, and like I said, I prefer to utilize my entire disk, but this data needs to coexist with other data on the disk.
|
|
|
|
|
You can manually remove files from the backup using the Finder's Action menu while within Time Machine. No need to hack around with the Terminal.
|
|
Access Control List. Leopard uses it in many places to provide greater flexibility over conventional Unix permissions we used to be restricted to.
|
|
|
What if you delete a backup set that has real files in it (not links, because the file changed) and subsequent backups link to that real file that your script just deleted? What's wrong with Time Machine's own, automated management of backups? I hope you know what you're doing, or one day when you need to restore from a backup, you may find some files not restorable because you deleted real files, and not just links. |
Well, I'm not using TM right now because the interface doesn't recognize network backups to a disk image over AFP, and AFP is also painfully slow. However, reread the Ars Technica and AppleInsider TM reviews. Hard links are simply pointers to the place on a disk where the file is stored. You can have multiple hard links pointing to the same file, and can delete one link without deleting the file itself. As long as there is one link to the file somewhere, the file will continue to be accessible. I tested this approach with a backup to a external drive and it seemed to work fine. |
Main drive has 10 files, numbered 1-10. You make your first backup on 11/16/07. The backup drive has folder (11/16/07) with the actual files stored on it. For the next ten days, no changes are made to the files. Folders (11/17/07) through (11/26/07) all contain links back to the files in folder (11/16/07). On 11/27/07, you change file 6. Let's call it 6a. So the backup folder for (11/27/07) would contain links to files 1-5 and 7-10 in (11/16/07) and a real file 6a. Then backups 11/28/07 and later have links to 1-5 and 7-10 in (11/16/07) and links to 6a in (11/27/07) Then you delete the 11/27/07 backup. You just lost file 6a, because it didn't contain a link to file 6 in the original backup because it was a different file, and therefore copied. Now all backups after 11/27/07 are invalid because they have links to 6a in the backup you just deleted. I'm not talking about deleting links. Subsequent backups are going to be a mix of links and files because of changes made to files. Does this (admittedly confusing) example make sense? I could try to do it graphically. :) |
| All times are GMT -5. The time now is 07:58 AM. |
|
Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.