Metadata Backup

GRAX Metadata Time Machine allows you to schedule Salesforce metadata backups and store all versions in the provider of your choice (S3, Azure etc) as well as push to GitHub or GitLab.

Introduction

GRAX stores all versions of your metadata in the customer-owned storage solution (S3, Azure etc). GRAX also allows you to push the metadata files to your Git provider in order to leverage best practice version control functionality.

Configuration Setup

To enable metadata backup, proceed to Configuration > Setup > Advanced Configuration within the GRAX Salesforce app. After enabling metadata backup within the Advanced Configuration, you still need to schedule the backup frequency. See below for how to do this in Heroku. On the AWS fully managed runtime, please reach out to GRAX Support to get this scheduled.

Use the Advanced Configuration page to enable metadata backup and optionally also enable the Github integration.

Instructions

Step 1: Schedule Metadata Backup

For Heroku users, use the Heroku Scheduler add-on within your Heroku app in order to set a schedule for how often you want the metadata backup to run. We recommend you run this daily; anything more frequent is not recommended.

You will paste the following run command when creating the scheduler job:

./grax salesforce-metadata-backup

📘

AWS Runtime

For customers operating on the GRAX fully managed runtime, please reach out to GRAX Support to get metadata backups scheduled after you set the configuration.

Step 2: Review Storage Folder

Once the metadata backup job completes, you can go into the storage provider you have set up to use with GRAX (S3, Azure etc) and navigate to the following path to see all the metadata files:

Amazon S3 > Vandelay Industries Prod Bucket > grax > audittrail > salesforce > Org ID of Salesforce Environment > metadata >

Above directory will house the Metadata backups that are occurring on a scheduled basis

You will see folders for each metadata component

You can see some sample metadata folders here. When you drill into each folder you will be able to download the metadata files.

Step 3: Open Metadata File in Preferred Editor

You may now want to review various pieces of metadata, compare to previous versions, etc. To do that we recommend downloading the metadata folder locally and opening in the editor of your choice (e.g. Visual Studio). This is the best way to interact with the metadata.

Download the metadata folder/files locally and open using your preferred editor.

Step 4: GitHub / GitLab Integration

📘

The ability to push to GitHub/GitLab may depend on your GRAX version, so be sure to check with GRAX Support if you need this feature.

As mentioned, by enabling and scheduling metadata backup, GRAX will write the metadata to your defined storage provider. You could optionally also write to Github/Gitlab, depending on the preferences selected in the Advanced Configuration.

See all supported metadata files in your chosen git repo

Dive into details about which specific metadata components were updated, and maintain detailed source control

Track all metadata changes and compare versions across each metadata backup using the Git tools you are accustomed to

Step 5: Restore Considerations

If you want to restore certain metadata components and deploy to your Salesforce environment, please have your Salesforce Admin/Developers/Vendor follow the established change management procedures you have in place. Companies use different tools and methods to deploy metadata; GRAX is agnostic to how you want to deploy the metadata that is backed up to your storage bucket.

Appendix

Supported Metadata Types

GRAX supports backing up any of the following metadata types below. For more information on each, please refer here

AccountRelationshipShareRule
ActionLinkGroupTemplate
ApexClass
ApexComponent
ApexPage
ApexTrigger
AppMenu
ApprovalProcess
ArticleType
AssignmentRules
Audience
AuraDefinitionBundle
AuthProvider
AutoResponseRules
BaseSharingRule
Bot
BrandingSet
CallCenter
Certificate
CleanDataService
CMSConnectSource
Community (Zone)
CommunityTemplateDefinition
CommunityThemeDefinition
CompactLayout
ConnectedApp
ContentAsset
CorsWhitelistOrigin
CriteriaBasedSharingRule
Custom Metadata Types (CustomObject)
CustomApplication
CustomApplicationComponent
CustomFeedFilter
CustomHelpMenuSection
CustomLabels
CustomMetadata
CustomObjectTranslation
CustomPageWebLink
CustomPermission
CustomSite
CustomTab
DataCategoryGroup
DelegateGroup
DuplicateRule
EclairGeoData
EntitlementProcess
EntitlementTemplate
EventDelivery
EventSubscription
ExternalDataSource
ExternalServiceRegistration
FeatureParameterBoolean
FeatureParameterDate
FeatureParameterInteger
FieldSet
FlexiPage
Flow
FlowCategory
FlowDefinition
GlobalValueSet
GlobalValueSetTranslation
Group
HomePageComponent
HomePageLayout
InstalledPackage
KeywordList
Layout
LightningBolt
LightningComponentBundle
LightningExperienceTheme
LiveChatAgentConfig
LiveChatButton
LiveChatDeployment
LiveChatSensitiveDataRule
ManagedTopics
MatchingRule
MilestoneType
MlDomain (Beta)
ModerationRule
NamedCredential
Network
NetworkBranding
Next 
OwnerSharingRule
PathAssistant
PermissionSet
PlatformCachePartition
Portal
PostTemplate
PresenceDeclineReason
PresenceUserConfig
Previous 
Profile
ProfilePasswordPolicy
ProfileSessionSetting
Queue
QueueRoutingConfig
QuickAction
RecommendationStrategy
RecordActionDeployment
ReportType
Role
SamlSsoConfig
Scontrol
ServiceChannel
ServicePresenceStatus
SharingRules
SharingSet
SiteDotCom
Skill
StandardValueSetTranslation
StaticResource
SynonymDictionary
Territory
Territory2
Territory2Model
Territory2Rule
Territory2Type
TopicsForObjects
TransactionSecurityPolicy
Translations
WaveApplication 
WaveDashboard 
WaveDataflow 
WaveDataset 
WaveLens 
WaveTemplateBundle
WaveXmd
Workflow

API Considerations

The metadata time machine process utilizes Salesforce API calls; there will be 1 API call per sObject to download all the standard and custom object metadata. There will additionally be 1 API call for every other metadata component type listed above.

Video Walkthrough