Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Salesforce DevOps for Architects

You're reading from   Salesforce DevOps for Architects Discover tools and techniques to optimize the delivery of your Salesforce projects

Arrow left icon
Product type Paperback
Published in Jan 2024
Publisher Packt
ISBN-13 9781837636051
Length 260 pages
Edition 1st Edition
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Rob Cowell Rob Cowell
Author Profile Icon Rob Cowell
Rob Cowell
Lars Malmqvist Lars Malmqvist
Author Profile Icon Lars Malmqvist
Lars Malmqvist
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Chapter 1: A Brief History of Deploying Salesforce Changes 2. Chapter 2: Developing a DevOps Culture FREE CHAPTER 3. Chapter 3: The Value of Source Control 4. Chapter 4: Testing Your Changes 5. Chapter 5: Day-to-Day Delivery with SFDX 6. Chapter 6: Exploring Packaging 7. Chapter 7: CI/CD Automation 8. Chapter 8: Ticketing Systems 9. Chapter 9: Backing Up Data and Metadata 10. Chapter 10: Monitoring for Changes 11. Chapter 11: Data Seeding Your Development Environments 12. Chapter 12: Salesforce DevOps Tools – Gearset 13. Chapter 13: Copado 14. Chapter 14: Salesforce DevOps Tools – Flosum 15. Chapter 15: AutoRABIT 16. Chapter 16: Other Salesforce DevOps Tools 17. Chapter 17: Conclusion 18. Index 19. Other Books You May Enjoy

The recovery process

In the event of a crisis, when Salesforce data becomes compromised or lost, the immediate availability of backups is a lifeline. Yet, merely having backups at the ready isn’t the entire solution for ensuring business continuity. An intricate architecture encompassing the recovery process, its validation, and the seamless restoration of data is paramount.

The initial step of this process is rooted in validating the backup’s viability. It’s a common pitfall to just assume the most recent backup is devoid of errors and ready for use. This assumption can lead to further complications, emphasizing the necessity for continuous monitoring of backup integrity. By automating and continuously monitoring backups, organizations can promptly detect anomalies, ensuring that a reliable and untainted backup is always at hand.

However, even before leaping into recovery mode, organizations must adopt a strategic stance. Analyzing the nature and extent of the data loss is critical. Delving into backup analytics can shed light on whether the data was corrupted or deleted entirely. It helps pin down which specific records and objects were affected, and when the anomaly occurred. This thorough examination ensures that the restoration process zeroes in on the affected areas, safeguarding any unaffected data from being inadvertently overwritten.

Once the scope of data requiring restoration is clear, the restoration process itself can be planned. For metadata, it is advisable to restore components incrementally in a logical order matching dependencies. Foundational elements such as core custom objects and fields should be addressed first, providing a base for permissions, business logic, and presentation layers to follow. Breaking restoration into smaller sections avoids error cascades and simplifies troubleshooting.

When substantial metadata volumes exist, a phased approach to restoring prioritized categories reduces risk. The recommended sequence is as follows:

  1. Data tier: The core custom objects, fields, and schema that define the foundation of the org’s data structure.
  2. Security: Permission sets, profiles, and sharing rules that control user access and data isolation.
  3. Programmability: Any Apex classes, triggers, components, and tests that enable custom business logic.
  4. Presentation: Visualforce, Lightning, and layout metadata that constitute the UI presentation layer.
  5. Other: Additional metadata such as emails, reports, and documents that customize and configure the org.

This workflow matches the platform’s inherent hierarchy from raw data components up through complex overlays.

Similarly, when restoring large data volumes, core objects should be prioritized first, while still capturing related data dependencies. Salesforce’s recommended priority is as follows:

  1. Users
  2. Accounts
  3. Campaigns
  4. Contacts
  5. Opportunities
  6. Cases
  7. Price books
  8. Products
  9. Leads
  10. Contracts

Such a division of object data is further encouraged by the Salesforce platform, depending on the restoration mechanism. If you’re using Apex, the behavior around record chunking should be well understood by architects – be sure to read and consider the Creating Records for Multiple Object Types section of the Salesforce documentation at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_limitations.htm#:~:text=Creating%20Records%20for%20Multiple%20Object%20Types.

Robust backup solutions can restore interconnected data across multiple objects to maintain relationship integrity. Segmenting very large datasets by owner or timeframe helps avoid platform limits when restoring manually. Architects should also be aware of the concepts of lookup skew, ownership skew, and the platform’s behavior around record locking when designing a restoration process.

Lookup skew in Salesforce refers to a situation where many records (usually tens of thousands or more) are associated with a single record through a lookup relationship. This can lead to performance issues and can negatively impact database operations such as queries, reports, and data loads. Ownership skew in Salesforce is a different but related concept to lookup skew. It occurs when many records in a Salesforce organization are owned by a single user or a small group of users. This can create performance issues and operational challenges, like those experienced with lookup skew.

By following a structured, phased restoration workflow specific to data loss circumstances, organizations can streamline recovery, troubleshoot issues early, and minimize errors caused by oversights in addressing interdependencies.

You might be wondering about the best way to perfect this restoration process. The answer lies in the utilization of Salesforce sandboxes. By conducting dry runs in these environments, teams can refine and optimize recovery procedures. Over time, these repeated practices forge a sort of muscle memory, enabling swift and efficient responses to real-time crises. Moreover, detailed documentation of this recovery blueprint serves a dual purpose: it’s a valuable reference guide and an essential training tool for onboarding new team members.

For organizations that have integrated DevOps into their operations, the recovery process can be streamlined further. Harnessing familiar tools and environments expedites restoration efforts. When teams are equipped to use tools and interfaces they interact with daily, it diminishes the likelihood of errors borne out of unfamiliarity.

While the importance of robust backups cannot be understated, an organization’s resilience in the face of data crises hinges on more than just backups. It requires a harmonious blend of meticulous planning, rigorous testing, comprehensive documentation, and continuous training. Only then can organizations be confident of a swift and effective response to data mishaps. Preparedness isn’t just a strategy; it’s the bedrock of data security in the Salesforce ecosystem.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime