{"id":198,"date":"2007-11-09T10:09:49","date_gmt":"2007-11-09T10:09:49","guid":{"rendered":"http:\/\/parkesy.wordpress.com\/2007\/11\/09\/backup-sharepoint-document-library\/"},"modified":"2007-11-09T10:09:49","modified_gmt":"2007-11-09T10:09:49","slug":"backup-sharepoint-document-library","status":"publish","type":"post","link":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/","title":{"rendered":"Backup Sharepoint Document Library"},"content":{"rendered":"<p>Don&#8217;t get all excited. This isn&#8217;t going to be anything too clever but i thought i&#8217;d share it anyway<\/p>\n<p>One of our clients uses WSS (v2) in conjunction with InfoPath to do their timesheets.<\/p>\n<p>We were asked how you would go about recovering the timesheets from a backup.<\/p>\n<p>I explained that we&#8217;d probably have to restore the site to a temporary site then move the files we needed from the restored document library to where it belongs (if someone knows an easier way please let me know?!)<\/p>\n<p>The client wanted to know if there was an easier way of doing this so i came up with a vbscript that grabs all the xml files and copies them to a folder. As i said at the start, this solution isn&#8217;t clever so if your looking to use this to backup other document types (word documents for example) it&#8217;s not going to bring any of the metadata with it<\/p>\n<p>The\u00a0script connects to the document library via a UNC path\u00a0and just treats it like a file share<\/p>\n<p>For this to work you need to make sure the WebClient service is running (if you get an error message that says something like &#8220;workstation driver is not installed&#8221; just restart the computer and you&#8217;ll be fine)<\/p>\n<p>If your going to schedule this you should probably add some code that maps a network drive to the share instead of accessing the UNC directly (only way i can think of passing credentials?)<\/p>\n<p>So heres the script&#8230;.<\/p>\n<pre>Dim myFSODim DocLib\n\nDim TimeSheet\n\nDim BackupTo\n\nDim dayWeek\n\nDim FullDay\n\nDim LibraryPath\n\nDim BackupPath\n\n\u00a0'Setup Variables\n\n'Ensure BackupPath ends with a \\\n\nLibraryPath=\"\\\\companyweb\\TimeSheets\"\n\nBackupPath=\"E:\\Time Sheet Backups\\\"\n\ndayWeek = DatePart(\"w\", (Date))\n\nSelect Case dayWeek\n\nCase 1\n\n\u00a0\u00a0\u00a0 FullDay = \"Sunday\"\n\nCase 2\n\n\u00a0\u00a0\u00a0 FullDay = \"Monday\"\n\nCase 3\n\n\u00a0\u00a0\u00a0 FullDay = \"Tuesday\"\n\nCase 4\n\n\u00a0\u00a0\u00a0 FullDay = \"Wednesday\"\n\nCase 5\n\n\u00a0\u00a0\u00a0 FullDay = \"Thursday\"\n\nCase 6\n\n\u00a0\u00a0\u00a0 FullDay = \"Friday\"\n\nCase 7\n\n\u00a0\u00a0\u00a0 FullDay = \"Saturday\"\n\nEnd Select\n\nSet myFSO = CreateObject(\"Scripting.FileSystemObject\")\n\nSet DocLib = myFSO.GetFolder(LibraryPath)\n\nSet BackupTo = myFSO.GetFolder(BackupPath &amp; FullDay)\n\nmyFSO.DeleteFile BackupTo.Path &amp; \"\\*.*\"\n\nFor Each TimeSheet In DocLib.Files\n\nTimeSheet.Copy BackupTo.Path &amp; \"\\\" &amp; TimeSheet.Name\n\nNext<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Don&#8217;t get all excited. This isn&#8217;t going to be anything too clever but i thought i&#8217;d share it anyway One of our clients uses WSS (v2) in conjunction with InfoPath to do their timesheets. We were asked how you would go about recovering the timesheets from a backup. I explained that we&#8217;d probably have to<\/p>\n<p><a class=\"readmore\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\"><span class=\"arrow-right icon\"><\/span>Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[42,45],"tags":[],"class_list":["post-198","post","type-post","status-publish","format-standard","hentry","category-scripting","category-sharepoint"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Backup Sharepoint Document Library - Andy&#039;s Techie Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Backup Sharepoint Document Library - Andy&#039;s Techie Blog\" \/>\n<meta property=\"og:description\" content=\"Don&#8217;t get all excited. This isn&#8217;t going to be anything too clever but i thought i&#8217;d share it anyway One of our clients uses WSS (v2) in conjunction with InfoPath to do their timesheets. We were asked how you would go about recovering the timesheets from a backup. I explained that we&#8217;d probably have toRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s Techie Blog\" \/>\n<meta property=\"article:published_time\" content=\"2007-11-09T10:09:49+00:00\" \/>\n<meta name=\"author\" content=\"Andy Parkes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Parkes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\",\"name\":\"Backup Sharepoint Document Library - Andy&#039;s Techie Blog\",\"isPartOf\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\"},\"datePublished\":\"2007-11-09T10:09:49+00:00\",\"dateModified\":\"2007-11-09T10:09:49+00:00\",\"author\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\"},\"breadcrumb\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/andyparkes.co.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backup Sharepoint Document Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/\",\"name\":\"Andy&#039;s Techie Blog\",\"description\":\"Professional Geek\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\",\"name\":\"Andy Parkes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"caption\":\"Andy Parkes\"},\"description\":\"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.\",\"sameAs\":[\"http:\/\/www.andyparkes.co.uk\/blog\"],\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Backup Sharepoint Document Library - Andy&#039;s Techie Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/","og_locale":"en_US","og_type":"article","og_title":"Backup Sharepoint Document Library - Andy&#039;s Techie Blog","og_description":"Don&#8217;t get all excited. This isn&#8217;t going to be anything too clever but i thought i&#8217;d share it anyway One of our clients uses WSS (v2) in conjunction with InfoPath to do their timesheets. We were asked how you would go about recovering the timesheets from a backup. I explained that we&#8217;d probably have toRead More","og_url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/","og_site_name":"Andy&#039;s Techie Blog","article_published_time":"2007-11-09T10:09:49+00:00","author":"Andy Parkes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Parkes","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/","url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/","name":"Backup Sharepoint Document Library - Andy&#039;s Techie Blog","isPartOf":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#website"},"datePublished":"2007-11-09T10:09:49+00:00","dateModified":"2007-11-09T10:09:49+00:00","author":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d"},"breadcrumb":{"@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/11\/09\/backup-sharepoint-document-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/andyparkes.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Backup Sharepoint Document Library"}]},{"@type":"WebSite","@id":"https:\/\/andyparkes.co.uk\/blog\/#website","url":"https:\/\/andyparkes.co.uk\/blog\/","name":"Andy&#039;s Techie Blog","description":"Professional Geek","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d","name":"Andy Parkes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","caption":"Andy Parkes"},"description":"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.","sameAs":["http:\/\/www.andyparkes.co.uk\/blog"],"url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pmvJ6-3c","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/198","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":0,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/198\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}