The amount of time the data needs to be stored is directly related to the media rotation scheme you use. For example, if you use one media and back up every day, your backups will never be more than a day old.
Since storage media is relatively inexpensive when compared to the value of your data, it is a good idea to periodically back up your system on media not used in the media rotation scheme and store it permanently. Some administrators may choose to do this every week, while others may choose to store only one permanent backup per month.
The threat of viruses is an issue also. Some viruses take effect immediately, while others may take days or weeks to cause noticeable damage.
Having these backups available should allow you to restore your system prior to when it became infected.