When a Xero subscription is cancelled, Xero will store your data in line with local legislation.
If, at any time, you need access to access your data, the Xero subscription can be reactivated by the subscriber.
We recommend that you export the data before the end of your cancellation notice period. That way a copy of your business records is available. It's your obligation to keep business records for your business. Note that exporting this data does not replace your obligation to retain key source documents relating to your business.
Below are some articles from Xero on these topics.