function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Linda 98Linda 98 

BACK up ORG on weekly basis.

I am trying to backup the entire org with eclipse.My eclipse gets struck.
what would be best way to entire org and also i need to back up them on weekly basis to my local directory.
Please help me with this.

Thanks in advance.
Michael WelburnMichael Welburn
If you are looking to back up the data, leverage the Data Export - https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_exportdata.htm

If you are looking to back up the config/metadata, you can set up a scheduled job on your computer that runs a script to pull down all the metadata (using Ant Migration Tool) and then commits the changes to your version control system. Here is a blog post that describes the process in a bit more detail: https://douglascayers.wordpress.com/2015/01/07/salesforce-automatic-metadata-backup-with-force-com-migration-tool/
Linda 98Linda 98
Thank you for your prompt response .Yes.i want to take backup of my metadata. I used ANT tool and it worked. But 1.i couldn't backup my standard objects and custom fields on standard fields.How can i do it? 2.i am having backup in my local directory.Now i want to restore this back again to org.How can i do it? 3.the link says automate with script.What is that script? And how do i set up it? Please guide me with these questions. Thank you.
Michael WelburnMichael Welburn
1) You need to explicitly reference standard fields in the package.xml (e.g. Account.Name) one by one if you want to grab those
2) The ANT Migration Tool can both retrieve and deploy, they are just two separate commands
3) I don't have a script handy, but it depends on your operating system. You'll either make a .bat (Windows) or .sh (Unix) file that sets ANT_HOME environment variable, runs the command for the ANT tool, and then runs a command to commit. Think of the script as just a collection of the commands you normally would run in a command prompt/terminal.
Linda 98Linda 98
Thanks a lot Micheal.

I am able to back up my org .
But i couldnt get custom fields of standard objects.So should i reference them explicitly.?
After the backup,i tried deploy back to the same org(after clearing old metadata,and all the data) But i got  around 230 errors and my deployment is failed.

I downloaded a new version of tool from org and ran the deployment.Still no luck.
I changed my java path,ant path and PATH location..still no luck.
Not sure what i am missing but i need to fix this asap.Please help me regarding this.

so kind of errors are:
1.Invalid Api Version: 36.0
2.objects/Customobject.object (CUSTOMOBJECT__c.CUSTOMFIELD__c) -- Error: duplicate value found: <unknown> duplicates value on record with id: <unknown> (line 738, column 13)
3.settings/Address.settings -- Error: Cannot make state Puerto Rico in country United States inactive after State and Country Picklists has been enabled
4. In field: template - no EmailTemplate named <MY TEMPALTE NAME> found.
5.The specified Package Version number does not exist for that Package: packagename.
6.and for profiles:this is  the error:
Unknown user permission: ChatterInviteExternalUsers


I am confused on how to solve them.Do i need to solve them indivdually?
If i have to include explicitly my custom fields and all,automating the process doesnt make any sense becuase every week i have to check my new custom fields and other and include in my package.Am i wrong?
what can i do with version issues?

please guide me regarding this.
thanks in advance.
Michael WelburnMichael Welburn
Standard Objects + Custom Fields
Take a look at this post to reference how to do it. You will need to explicitly reference each one since standard objects and custom fields don't support wildcards.
http://salesforce.stackexchange.com/a/27392/411

Errors
1) You can change your API version to 35 in your package.xml. 36 is for Spring 16 release which is releasing this month, you might be deploying to an org that hasn't been upgraded.
2) You need to ensure you don't reference the same item multiple times in your package.xml
3) State and Country picklists unfortunately cannot be migrated, you have to manually create them. Also, since using picklists is a feature, it is one of those things you need to get enabled in the org prior to running the migration.
4) Make sure you chose the email templates in your export (you need to specify the folders they are in as well. If they (or reports) are in your personal folder they may not come out.
5) Is this related to a managed package? You need to install managed packages through the provided link for the App rather than ANT Migration Tool
6) This may be a remnant of using inconsistent API versions.
If you get a single error, every subsequent error caused by that dependency will also claim to be an error (hence the easy way to get so many)
Linda 98Linda 98
Very much thanks for the prompt responce.
So if i get one single error ,the entire process of deployment is failed?
So each time i need to check each and every object for picklist,packages,email templates..etc...am i correct?

thats a painfull job:'(