tag:blogger.com,1999:blog-6140199022860280334.post3396423377173008246..comments2024-03-28T13:07:29.449+00:00Comments on Bob Buzzard Blog: Force CLI Part 2 - Extracting MetadataBob Buzzardhttp://www.blogger.com/profile/07815472992351343395noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-6140199022860280334.post-39212176533220187292020-08-31T18:42:49.848+01:002020-08-31T18:42:49.848+01:00I wouldn’t use the force CLI now that the Salesfor...I wouldn’t use the force CLI now that the Salesforce CLI is here. Bob Buzzardhttps://www.blogger.com/profile/07815472992351343395noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-40524025880350667912020-08-25T06:04:21.669+01:002020-08-25T06:04:21.669+01:00Can you provide us the link for restoring the meta...Can you provide us the link for restoring the metadataAnonymoushttps://www.blogger.com/profile/16995639693765403775noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-36467104195414165672016-11-01T20:03:07.109+00:002016-11-01T20:03:07.109+00:00I have the same problem as Mark, but I am on a Mac...I have the same problem as Mark, but I am on a Mac. If I open a terminal and cd to one level above the "metadata" folder, and then I:<br /><br />force push -t ApexClass -f metadata/classes/ -l NoTestRun<br /><br />or: <br /><br />force push -t ApexClass -f metadata/classes/ <br /><br />The command just hangs forever. Nothing happens. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-16329009964912641522016-07-19T01:30:16.073+01:002016-07-19T01:30:16.073+01:00Thank you for your post! This is way better that ...Thank you for your post! This is way better that the ANT script that I've implemented to do basically the same thing. Here's how I added source control (I welcome any feedback): <br />#!/bin/bash<br /><br />#clone backup repo into the folder 'metadata'<br />git clone git@bitbucket.org:[user/group account]/[repo name].git metadata<br /><br />#export will dump into the 'metadata' folder automatically<br />force export<br />force fetch -t Aura<br /><br />#create variable '$NOW' to store the current date time<br />NOW=$(date +"%Y-%m-%d %H:%M:%S")<br /><br />#copy the backupscript to the metadata folder for script versioning<br />cp backupScript.sh ./metadata/<br /><br />#get into the right directory<br />cd metadata<br /><br />#update a log file so that there is always something to check-in<br />echo "Last Updated: $NOW" > update.log<br /><br />#add any changes that were made (update/add/delete) to git for staging<br />git add .<br />#commit changes to the local git repo<br />git commit -m "$NOW Daily Data Backup using Automated Script"<br />#push the changes out to the remote that was associated in the 'clone' above<br />git push origin master<br /><br />#move up a directory<br />cd ..<br />#remove the metadata folder as cleanup<br />rm -rf ./metadataAnonymoushttps://www.blogger.com/profile/14802383606285335311noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-67306976149929593942016-07-14T14:13:00.626+01:002016-07-14T14:13:00.626+01:00Sorry, we are a Mac outfit so I've only used i...Sorry, we are a Mac outfit so I've only used it on that.Bob Buzzardhttps://www.blogger.com/profile/07815472992351343395noreply@blogger.comtag:blogger.com,1999:blog-6140199022860280334.post-33784981727619982172016-07-09T20:41:40.261+01:002016-07-09T20:41:40.261+01:00Hi Bob. Have you used the Force.com CLI in Windows...Hi Bob. Have you used the Force.com CLI in Windows7 (64bit) before? I am having trouble with the "push" param<br />When I type this:<br />C:\sfdc\force push -t ApexClass -n myClass -l NoTestRun<br />I get this...<br />Validating and deploying push...<br /><br />But then it just hangs and the file is never actually pushed to my target sandbox org.<br /><br />Any ideas?Markhttps://www.blogger.com/profile/01134448510711310164noreply@blogger.com