Back Up Metadata to Secure and Restore Your Customizations | Salesforce Guide
You can protect your organization’s customizations, like customized fields, custom Apex code (Everything you wrote in your console), page layouts, reports, and permission sets, by backing up your metadata in Salesforce.
Required Editions and User Permissions
This feature is available in: Developer editions, Enterprise editions, Performance editions, Professional editions, and Unlimited editions.
User Permissions Needed
To create unmanaged packages: Create Appexchange Packages and Manage Users
Back-Up Your Metadata
Backing up your metadata gives you a snapshot of that metadata at a specific point in time. At a future time, you'll be able to compare the backed-up metadata with newer metadata. you may try this to revert your metadata to a previous state or to spot what changes are made for purposes like debugging.
To copy your metadata, create an unmanaged package.
- In Setup, enter Package Manager within the Quick Find box, so select Package Manager.
- Select New, name the package and choose Save.
- within the Components tab, select Add.
- within the Component Type dropdown list, select the categories of metadata you wish to incorporate in your backup, and click on augment Package for every metadata type.
- to end creating this unmanaged package, click Upload.
You got an email whenever your package has been uploaded to the Package Manager page in Salesforce org.
Don't forget to check out: How to Import Salesforce Custom Metadata Records using CSV/JSON
NOTE: Unmanaged packages don’t support all metadata types. For more advanced metadata backup options, API and CLI commands are available.
Create a brand new Version of Your Unmanaged Package
It’s likely that your organization’s metadata is changing daily, which new metadata types are added. to safeguard these changes, periodically create a brand new version of your unmanaged package.
Create a replacement version of your unmanaged package
- In Setup, enter Package Manager within the Quick Find Box, and so select Package Manager.
- Click the Package Name for the unmanaged package you created.
- within the Components tab, select Add.
- within the Component Type dropdown list, select any new styles of metadata you wish to feature to your backup, and click on raise Package for every metadata type.
NOTE: Changes to components that were added during a previous package version are captured automatically after you create a brand new version.
- Click Upload, and within the Package Detail screen complete the Version Name field. Consider adding details within the Description field so you recognize when this version was created, and click on Upload.
Each time you create a brand new package version, you’ve created a brand new snapshot of your metadata.
Restore Your Metadata From an Unmanaged Package
We recommend restoring metadata in a very sandbox organization. Then use your standard method for deployment from a Sandbox to your production organization.
Check out another amazing blog by Mohit here: Import Data With The Info Import Wizard | Salesforce Guide
To restore your metadata from an unmanaged package:
- In Setup, enter Package Manager within the Quick Find Box, so select Package Manager.
- Click the Package Name for the unmanaged package you created.
- From the Package Detail page, click the Versions tab, and choose the package version number.
- Copy the installation URL from the Package Version Detail page.
- Use the installation URL to put in your unmanaged package in an exceeding sandbox organization.
- Work with a developer to retrieve and redeploy the metadata to revive using either the Metadata API or the Salesforce CLI.
Key points: In Salesforce Third-party release management applications that automate information (data) and metadata backup are found on AppExchange.
Responses