This answer adresses more scenarios when one needs to preserve one or more Time Machine backups.)
Time Machine is not designed for preserving old backups indefinitely (i.e. For permanent archives). Even if there is plenty of free space on the backup disk, Time Machine will delete a backup after 24 hours in case it's not the furst backup of a day. If it is, Time Machine will keep it for 30 days unless it is also the first backup of a week, where the start of a week is defined as the time and day of the initial backup (thus not necessarily Monday or Sunday). The life span of the first backup of a week is not time limited. However, the oldest backup is deleted if space is needed for a new one, unless it's not the last remaining backup.
So, later, if you decide to restore the latest backup Time Machine has ever made on the old system, it may already not be available, and you may need to pick an older backup instead that Time Machine has kept according to the aforementioned rules.
Basically, you have two options if you want to preserve one or more backups:
- Start a new set of backups to a new disk or partition, or
- preserve the backup by other means than Time Machine, and continue backing up to the same set of backups.
Note that if you install the system on an erased disk or partition, and put your data back (whichever way you do it, including Setup Assistant and Migration Assistant), or if you restore the whole system (again, whichever way you do it, including a restore from a Time Machine backup using OS X Recovery), then the first Time Machine backup will probably be a full backup (not an incremental one which could save a lot of backup disk space and time). However, you may be able to prevent it by following this guide.
Starting a new set of backups to a new disk or partition
This may be preferred, as it will allow you to restore your old system in the future most easily, by restoring from a Time Machine backup using OS X Recovery.
You might be able to create a new partition on your current Time Machine backup disk even without erasing it by following the steps here.
Depending on free space and other preference, you may want the new partition to be either for future backups of the new system, or it can hold only the single latest backup of the old system, selecting the new partition temporarily in the Time Machine Preferences just before the system upgrade, but continuing backing up to the old partition after that. You may also consider adding some exclusions, so that it holds really only the old system without the data you are already backing up to the old partition.
To see the old set of backups after starting a new one, you'll need the Browse Other Backup Disks option.
Preserving a backup by other means
This can be done even via the Time Machine interface, either before or after upgrading the system, by restoring the old system backup to a chosen location, such as a different folder on the Time Machine backup disk or another backup disk.
Another way is making a clone of the old system or its Time Machine backup via a specialized software like Carbon Copy Cloner.
Moving the Time Machine Backups.backupdb folder to a different location on the backup disk, using a little modification of the command supplied in M K's answer, to isolate it from the reach of Time Machine, will also do the trick, but it would require a reverse process every time you need to access the old backups via Time Machine or perform OS X Recovery. On the other hand, making a permanent backup this way is much faster, as it doesn't require copying anything.
It is also worth noting that if you want to keep a backup just because you want to retain an option to downgrade OS X, then you have also another option. If you have purchased or downloaded an older version of OS X in past using the Mac App Store, you can download its installer again from the purchase history in the Mac App Store. It's not possible to run the older installer from a newer version of OS X though – first, you would have to erase the partition the current system is on and install the older OS X version fresh. Then you can use Setup Assistant or Migration Assistant to copy your data, accounts, and/or settings (apps won't work) which you've backed up via time Machine on the previous system with newer OS X.