1310 - How to backup and recover Xero

Modified on Tue, 5 Aug at 1:11 PM

If you're looking for a Xero backup solution, you can find more information on our website, or start a free trial here

 

Introduction

Backing up and restoring Xero forms part of our cloud service offering. To use the service, you need to be both a RedApp company administrator, and a Xero user at the organisation/s you wish to back up.

 

What is supported?

Redstor currently supports backup and InstantData recovery of:

  • Accounts
  • Assets (including draft, disposed and registered assets), asset types, and asset settings
  • Batch payments
  • Branding themes
  • Bank transactions
  • Bank transfers
  • Contacts and contact groups
  • Currencies
  • Credit notes
  • Employees
  • Expense claims
  • Files and file associations
  • Folders
  • Invoices, repeating invoices, and invoice reminders
  • Items
  • Journals
  • Linked transactions
  • Manual journals
  • Organisation settings (including UK Construction Industry Scheme settings)
  • Overpayments
  • Payments
  • Prepayments
  • Projects, project tasks, project time entries, and project users
  • Purchase orders
  • Quotes
  • Receipts
  • Tax rates
  • Tracking categories
  • Users

Attached files in Xero can also be restored with InstantData.

 

Guides

Use the guides below to manage your Xero backups.

How to add a backup set

How to configure the backup schedule for a backup set

How to recover a backup set

How to delete a backup set

 

 

How to add a backup set

Watch our video or follow the steps below.

 

1. On the RedApp home page, go to My Company or to the relevant customer company.

my_company.png

2. To add a new backup set, go to Xero in the sidebar.

3.PNG

3. Click Add at the top right.

add.PNG

4. You will now need to sign into Xero. Click Next to proceed.

2.PNG

5. Select the organisation you want to connect and click Continue.

organisations.png

Note:

  • If authorisation fails and you get an error, log out of Xero and re-attempt the authorisation.
  • If you need to later revoke Redstor's permissions for whatever reason, please see this article from Zero's knowledge base.

6. Once authorisation is successful, the name of your newly created backup set will now appear on the side navigation of the RedApp. Click on the name to proceed with your first backup or make changes to the backup set.

4.PNG

7. To run your first backup, click on the menu icon at the top right of the backup set home page and select Backup.

xero_backup.PNG

You can customise which columns you see on the backup set home page by going to Customise display.

xero_columns.PNG

display_options.png

You can also view an audit trail of key actions and which users performed them by clicking on the inspect icon at the top right of the page. 

audit_trail.PNG

 

How to configure the backup schedule for a backup set

1. On the home page for the relevant Xero backup set, click on Backup schedule > Edit.

backup_schedule_card.PNG

2. You can retain the default of a single daily backup, or you can set your backups to only run on specific days (custom). In either case, use the drop-down menu to set the backup time. Set your preferences and click on the check mark.

edit_backup_schedule_new.png

 

How to recover a backup set

Important note: Recovery of Xero is done through InstantData, and requires some knowledge of Python to collect the necessary content. Recovery will not result in the recreation of your Xero environment as is.

1. On the home page for the relevant Xero backup set, click on the menu icon and select Recover. This option will only be available if a backup of the set has successfully completed.

xero_recover.PNG

You will need to authenticate with Xero before you can proceed.

2. Download the InstantData agent using the Download button or use Copy to clipboard to get the shareable link. Each agent can only be used to initiate one restore.

8.PNG

3. On the machine where you want to recover the data, run the downloaded installer. Once the application opens, you can copy the files from there into your file explorer. The files will be in JSON format.

Important note: From this point, we recommend consulting the detailed guides on Xero's knowledge base (e.g. Import a chart of accounts) to assist you in recovery. Use their provided templates to make sure you import your data correctly.

4. To return your files to CSV format (spreadsheets), open Microsoft Excel and click on the Data tab. 

data_menu.png

5. Go to Get Data > From File > From JSON.

get_data.png

6. Select the file you need, for example Journals.json, and click Import

journals_json.png

If your data is distributed across multiple files, you will need to combine all the necessary JSON files from a directory into a single JSON file that contains an array with the content of those files. You can use the Python script provided below to do this.

Be sure to replace /path/to/your/directory with the actual path to the directory containing your JSON files, and /path/to/output.json with the desired path for the combined JSON file.

``python

import os
import json

# Directory containing JSON files
directory_path = '/path/to/your/directory'

# List to store the JSON data
json_data = []

# Loop through all files in the directory
for filename in os.listdir(directory_path):
if filename.endswith('.json'):
file_path = os.path.join(directory_path, filename)
with open(file_path, 'r') as file:
# Load the JSON content and append it to the list
json_content = json.load(file)
json_data.append(json_content)

# Path to the output JSON file
output_file = '/path/to/output.json'

# Write the combined data to the output file as an array
with open(output_file, 'w') as outfile:
json.dump(json_data, outfile, indent=4)

print(f'Combined {len(json_data)} JSON files into {output_file}')
```

7. Click Into Table.

into_table.png

8. Expand the Value column and select Expand to New Rows to access the records in the list.

expand_to_new_rows.png

9. Expand the Value column again to access individual fields (you may want to Load more to make sure you have all the fields listed as columns).

expanded_value.png

10. Untick the box for Use original column name as prefix, as this option causes the columns to be named "Value.(name)", which means they cannot be recognised by Xero's system on import. Then click OK.

click_ok.png

11. To get to journal lines, expand the Value.JournalLines column by clicking on the arrows icon.

Note: For files other than Journals, Steps 11-13 may not be necessary.

value_journal_lines.png

12. Select Expand to New Rows to add a row for each journal line.

value_journal_lines_expand.png

13. Select the relevant journal line columns and click OK.

journal_line_columns.png

14. Click Close & Load to load the journal lines into your spreadsheet.

close_load.png

 

How to delete a backup set

1. On the home page for the relevant Xero backup set, click on the menu icon to expand more options, then click Remove.

xero_remove.PNG

2. Confirm the deletion by clicking Remove.

xero_remove_confirm.PNG

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article