{"id":27557,"date":"2020-11-04T11:00:13","date_gmt":"2020-11-04T16:00:13","guid":{"rendered":"https:\/\/blogs.solidworks.com\/tech\/?p=27557"},"modified":"2020-11-03T11:04:12","modified_gmt":"2020-11-03T16:04:12","slug":"how-to-automatically-back-up-everything-in-solidworks-electrical-using-task-scheduler","status":"publish","type":"post","link":"https:\/\/blogs.solidworks.com\/tech\/2020\/11\/how-to-automatically-back-up-everything-in-solidworks-electrical-using-task-scheduler.html","title":{"rendered":"How to Automatically back up EVERYTHING in SOLIDWORKS Electrical  using Task Scheduler"},"content":{"rendered":"<p>If you\u2019ve ever taken a class in SOLIDWORKS Electrical or gone through an implementation, chances are you\u2019ve been told to Archive Environment REGULARLY. This is your backup \u2013 your \u201cEek! The server crashed and we need to get everything back up and running on another machine STAT!\u201d safety, and based on how things are going this year, if I were you, I would not take any chances. Considering all of the metadata and data that SOLIDWORKS Electrical stores, the fact that we are able to package everything up neatly into a single file with Archive Environment is pretty impressive, but the problem (up until now) has always been remembering to do it. Yes \u2013 the program will remind us to do it at any interval we choose, but only IF we open the application, so what can we do?<\/p>\n<p>Let\u2019s automate it\u2026 with Task Scheduler!<\/p>\n<p>Before we get ahead of ourselves, I should note that this is a feature exclusive to SOLIDWORKS Electrical 2021. Since PR1 is out, I get the fun of showing you guys how it works BEFORE SP0 is released! SUCH FUN!<\/p>\n<p>OK so first things first, let\u2019s take a look at the magical application that the SOLIDWORKS Electrical fairies (developers) have gifted us with that will make this work: <strong>ewenvironmentarchiver.exe<\/strong>. For a typical installation, this application is located at \u201cC:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS Electrical\\bin\\EwEnvironmentArchiver\u201d. The first thing we want to do is open this application and change the <strong>Output folder<\/strong> to somewhere safe.<\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27555 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive.png\" alt=\"\" width=\"1947\" height=\"1270\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive.png 1947w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive-300x196.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive-615x401.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive-768x501.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive-1536x1002.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20120swe20archive-728x475.png 728w\" sizes=\"auto, (max-width: 1947px) 100vw, 1947px\" \/><\/a><\/p>\n<p>If <strong>User rights management<\/strong> is activated in SOLIDWORKS Electrical, we will also want to login as a user with credentials that allow them to Archive Environment.<\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27554 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive.png\" alt=\"\" width=\"1947\" height=\"1270\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive.png 1947w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive-300x196.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive-615x401.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive-768x501.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive-1536x1002.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20220swe20archive-728x475.png 728w\" sizes=\"auto, (max-width: 1947px) 100vw, 1947px\" \/><\/a><\/p>\n<p>We can also choose <em>what<\/em> we want to archive under <strong>Archive mode<\/strong>, and I chose to un-check the box next to <strong>Open log file<\/strong>. Once we specify these settings, we can move on to the next step: setting up Task Scheduler!<\/p>\n<p>Task Scheduler can be found from the Start Menu under Programs &gt; Windows Administrative Tools, or by simply searching for it from the search bar. Once we have it open, we can create a new folder by Right-clicking <strong>Task Scheduler Library<\/strong>, selecting <strong>New Folder\u2026<\/strong> , and entering a name. I created a folder called SOLIDWORKS just for the sake of organization.<\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27553 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive.png\" alt=\"\" width=\"1964\" height=\"1407\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive.png 1964w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive-300x215.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive-615x441.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive-768x550.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive-1536x1100.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20320swe20archive-728x522.png 728w\" sizes=\"auto, (max-width: 1964px) 100vw, 1964px\" \/><\/a><\/p>\n<p>The next step is to select our folder and click <strong>Create Basic Task\u2026<\/strong> (on the right under <strong>Actions<\/strong>). Give this a name and click <strong>Next &gt; <\/strong>.<\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27551 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive.png\" alt=\"\" width=\"1962\" height=\"1649\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive.png 1962w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive-300x252.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive-615x517.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive-768x645.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive-1536x1291.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20420swe20archive-728x612.png 728w\" sizes=\"auto, (max-width: 1962px) 100vw, 1962px\" \/><\/a><\/p>\n<p>Now we get to pick how often we run the task. This will depend on how often your company uses SOLIDWORKS Electrical and how much storage space you have. I chose <strong>Daily<\/strong> and selected <strong>Next<\/strong>.<\/p>\n<p>This allows us to choose a time when we want to perform the task. For this step, I would recommend choosing a time when you won\u2019t be actively using the program and when there isn\u2019t an overwhelming amount of activity on the server already. I set the start time to <strong>11:00 PM<\/strong> and clicked <strong>Next. <\/strong><\/p>\n<p>It\u2019s action time! Under \u201cWhat action do you want the task to perform?\u201d we want to select <strong>Start a program<\/strong> and click <strong>Next<\/strong>.<\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27556 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive.png\" alt=\"\" width=\"1739\" height=\"1220\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive.png 1739w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive-300x210.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive-615x431.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive-768x539.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive-1536x1078.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20520swe20archive-728x511.png 728w\" sizes=\"auto, (max-width: 1739px) 100vw, 1739px\" \/><\/a><\/p>\n<p>From here, we need to click <strong>Browse<\/strong> next to <strong>Program\/script<\/strong> and then navigate over to our application (typically \u201cC:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS Electrical\\bin\\EwEnvironmentArchiver\u201d) and select <strong>Open. <\/strong><\/p>\n<p><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27552 alignnone\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive.png\" alt=\"\" width=\"2734\" height=\"1702\" srcset=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive.png 2734w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-300x187.png 300w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-615x383.png 615w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-768x478.png 768w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-1536x956.png 1536w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-2048x1275.png 2048w, https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/image20620swe20archive-728x453.png 728w\" sizes=\"auto, (max-width: 2734px) 100vw, 2734px\" \/><\/a><\/p>\n<p>Next to <strong>Add arguments (optional): <\/strong>we want to type \u201c<strong>runwithlastoption<\/strong>\u201d and then select <strong>Next.<\/strong><\/p>\n<p>Now all we have to do is click <strong>Finish<\/strong> \u2026 and we\u2019re done!<\/p>\n<p>Here\u2019s a video of it in action:<\/p>\n<div style=\"width: 1140px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-27557-1\" width=\"1140\" height=\"641\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/SWE-Archive.mp4?_=1\" \/><a href=\"https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/SWE-Archive.mp4\">https:\/\/blog-assets.solidworks.com\/uploads\/sites\/4\/SWE-Archive.mp4<\/a><\/video><\/div>\n<p>Of course, all of our backup files can be found at the location specified at the beginning of this process (the <strong>Output folder<\/strong>), so if you\u2019re ever in a bind, you can always restore your work from there.<\/p>\n<p>Thanks for following along! I hope this helps a ton of you out. I know this is a game-changer for me. Happy designing!<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve ever taken a class in SOLIDWORKS Electrical or gone through an implementation, chances are you\u2019ve been told to Archive Environment REGULARLY. This is your backup \u2013 your \u201cEek! The server crashed and we need to get everything back<\/p>\n... <a href=\"https:\/\/blogs.solidworks.com\/tech\/2020\/11\/how-to-automatically-back-up-everything-in-solidworks-electrical-using-task-scheduler.html\">Continued<\/a>","protected":false},"author":530,"featured_media":27551,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2610,24,35],"tags":[2002,386],"class_list":["post-27557","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-solidworks-2020","category-solidworks-electrical","category-tips-tricks","tag-backup","tag-electrical"],"acf":[],"_links":{"self":[{"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/posts\/27557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/users\/530"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/comments?post=27557"}],"version-history":[{"count":1,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/posts\/27557\/revisions"}],"predecessor-version":[{"id":27558,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/posts\/27557\/revisions\/27558"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/media\/27551"}],"wp:attachment":[{"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/media?parent=27557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/categories?post=27557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.solidworks.com\/tech\/wp-json\/wp\/v2\/tags?post=27557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}