MacOS – Restrict size of TimeMachine backups

macostime-machine

I have an external 2TGB HD which I use as a TimeMachine backup.
This developed problems and could not be repaired.

enter image description here

Repairing file system.
Checking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Invalid index key
Incorrect block count for file permStore
(It should be 17 instead of 0)
Incorrect block count for file shutdown_time
(It should be 1 instead of 0)
Rebuilding catalog B-tree.
Disk full error
The volume Time Machine Backups could not be repaired.

I bought a new 3TB disc, created a 2TB partition, and attempted to copy Backups.backupdb.
Finder spent 24 hours "Preparing to copy"; then failed due to lack of space!

I reformatted and created a 2.5TB partition, Finder has spent 24 hours "Preparing to copy" and is now copying files.

enter image description here

I really don't need all the backups (which go back to 2012) and I don't want TimeMachine to use all the space on my new drive. Ideally I would like to restrict the size of the backup.

My questions are:-
How can I reduce size of Backups.backupdb? Is deleting the oldest directories OK?
Is there any way I can get TimeMachine to restrict the size of Backups.backupdb, other than resizing the partition?

UPDATE
My attempt to copy failed after about 30% of the disk was copied.
I attempted to use rsync but while this appeared to run could not create any new files Operation not permitted (1).
Even though I had used sudo I probably should have used a root terminal.
Ultimately this too failed, due to lack of resources.

I then use Disk Utility to copy the image and ran First Aid. This found a number of issues, but ultimately failed.

Repairing file system.
Checking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Invalid index key
Incorrect block count for file permStore
(It should be 17 instead of 0)
Incorrect block count for file shutdown_time
(It should be 1 instead of 0)
Rebuilding catalog B-tree.
Rechecking volume.
Checking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Incorrect block count for file permStore
(It should be 17 instead of 0)
Incorrect block count for file shutdown_time
(It should be 1 instead of 0)
Checking multi-linked files.
Checking catalog hierarchy.
Checking extended attributes file.
Checking multi-linked directories.
Checking volume bitmap.
Volume bitmap needs minor repair for orphaned blocks
Volume bitmap needs repair for under-allocation
Checking volume information.
Repairing volume.
Rechecking volume.
Checking Journaled HFS Plus volume.
Detected a case-sensitive volume.
Checking extents overflow file.
Checking catalog file.
Checking multi-linked files.
Checking catalog hierarchy.
The volume Time Machine Backups could not be verified completely.
File system check exit code is 8.
File system verify or repair failed.
Operation failed…

Best Answer

I decided to return to plan A (copy Backups.backupdb), (having first made more swap space on my Mac by deleting movies) and closing down all running programs.

After more than 24 hours, this had completed the copy, and the files all looked OK.

I then enabled the disk in Time Machine, and ran a backup. This informed me it was making a new backup, and proceeded to copy 350GiB of data.

This was not quite as I hoped. Inspection of the file system indicated that none of the files were hard linked into the old backups.

As far as Time Machine is concerned, all my backups are there, and sample checks indicate all files seem OK.

Subsequent backups appear to working as normal, files are hard linked into the initial backup.

I did some pruning of earlier backups with tmutil delete, but it is obvious I am only going to get back to a 2TiB image with serious pruning.

I did toy with the idea of trying to combine the hard links, but decided I will leave the disk as is, and just accept that I now have a 3TiB Time Machine. At least I do have all my historical backups if I need them .