# Repair

Use this page to upgrade and rebuild data from a previous version of Sugar for the current version of the program. You also use this option to convert a Sugar installation to offline mode.

The upgrade options include:

- Quick Repair and Rebuild: Repairs and rebuilds the database, extensions, vardefs, dashlets etc., for selected modules.
- Repair Database: Repairs My SQL database based on values defined in vardefs.
- Expand Column Width: For MSSQL, expands certain char, varchar and text columns in database.
- Clear Chart Data Cache: Removes cached data files used by charts.
- Clear Template Data Cache: Removes cached template files.
- Clear Vardefs Data Cache: Removes vardefs from the cache.
- Rebuild .htaccess file: Rebuilds .htaccess to limit access to certain files directly.
- Rebuild Audit: Rebuilds the audit table.
- Rebuild Config File: Rebuilds config.php by updating version and adding defaults when not explicitly declared.
- Rebuild Extensions: Rebuilds extensions including extended vardefs, language packs, menus, and administration.
- Rebuild Relationships: Rebuilds relationship metadata and drops the cache file.
- Rebuild Schedulers: Rebuild your out-of-the-box Scheduler Jobs.
- Rebuild Dashlets: Rebuilds the Dashlets cache file.
- Rebuild Javascript Languages: Rebuilds Javascript versions of language files.
- Rebuild Workflow: Rebuilds the workflow cache and compiles plugins.
- Rebuild Javascript Languages: Rebuilds Javascript versions of language files.
- Rebuild JS Compressed Files: Copies original Full JS Source files and replaces existing compressed JS files.
- Rebuild JS Grouping Files: Re-concatenates and overwrites existing group files with latest versions of group files.
- Rebuild Minified JS Files: Copies original Full JS Source Files and minifies them, then replaces existing compressed files.
- Repair JS Files: Compresses Existing JS files - includes any changes made, but does not overwrite original JS Source files
- Repair Roles: Repairs roles by adding all new modules that support access control as well as any new access controls to existing modules.
- Repair Indexes: Validates and, optionally, repairs database indexes against definitions in vardef files.
- Repair Inbound Email Accounts: Repairs Inbound Email accounts and encrypts account passwords.
- Remove XSS: Removes XSS Vulnerabilities from the database.
- Repair Activities: Repairs Activities (Calls, Meetings) end dates.
- Check Reports: Checks whether reports are still valid after an upgrade and lists any invalid reports that are found during the check.