How to take the schema backup for Apex class and Trigger:

The Eclipse will help us to take backup in the production or developer org or sandbox.

To install Eclipse à Go to Eclipse webpage and download the related eclipse file for your system and extract the zip file. Refer the eclipse link below.

Step 1: Install the Eclipse and Open the Eclipse. Select the workspace by selecting the folder you prescribed for the eclipse to store the data.

Step 2: Install the Salesforce Force IDE to Eclipse by below steps:

  1. Select Help | Install New Software.
  2. Click Add. In the Add Repository dialog, set the name to com IDE and the location to “”. Now Click OK.
  3. To install an older version of the plug-in, deselect Show only the latest versions of available software.
  4. Eclipse downloads the list of available plug-ins and displays them in the Available Software dialog.
  5. Select IDE.
  6. If you want to install the Apex Debugger or our tools for working with Lightning components, select Debugger or Lightning Support.
  7. In the Install Details dialog, click Next.
  8. In the Review Licenses dialog, accept the terms and click Finish.
  9. If you chose to install support for Lightning components, Eclipse displays a warning dialog about installing software that contains unsigned content. We are bundling third-party plug-ins to support Lightning components. Salesforce doesn’t own these third-party plug-ins; hence, we don’t sign them. Click OK to proceed.
  10. Eclipse downloads and installs the IDE and the required dependencies. When the installation is complete, you are prompted to restart. Click Yes.
  11. When Eclipse restarts, select Window | Open Perspective | Other | Select and then click OK. You are now ready to develop and customize Salesforce applications in Eclipse!

Step 3: Now click on the Create new Java – EE. Now the Enter the Project name and Click Finish.

Step 4: Now Go to File | New | IDE Project. It open New IDE Project Dialog box.

Step 5: Enter the Project name, Username and Password of Salesforce account and enter the security token of your org and Click Next.

Steps to find the security token is below:

  1. Go to settings in your org. In the Search box find the Reset My Security Token.
  2. Click on the Reset Security token. Now the security token is received to your org mail id.

Step 6: Now select the selected metadata compounds radio button and click choose. Select the Classes and triggers folder and click Finish.

Step 7: Now select the Project name that displayed in the Project Explorer. Now select the src.

Step 8: Now select the folder of classes and triggers below the src.

Step 9: Now right click and select the Export. Now the Export Popup will be open. Select File system under the General section and click Next.


Step 10: Now select the required Class and Trigger. In the To Directory select the particular you want to export the classes and triggers and Click Export.

Once the process completed the related classes and triggers will be exported in the selected folder.


Prepared By,
Karthikeyan T,
Software Engineer,
Merfantz Technologies.