{"id":298,"date":"2013-04-02T13:30:49","date_gmt":"2013-04-02T11:30:49","guid":{"rendered":"http:\/\/www.petuh.de\/?p=298"},"modified":"2013-04-02T13:30:49","modified_gmt":"2013-04-02T11:30:49","slug":"windows-backup-mit-wbadmin-und-email-benachrichtigung","status":"publish","type":"post","link":"https:\/\/www.piprojects.net\/en\/windows-backup-mit-wbadmin-und-email-benachrichtigung\/","title":{"rendered":"(Deutsch) Windows Backup mit wbadmin und Email Benachrichtigung"},"content":{"rendered":"<p class=\"qtranxs-available-languages-message qtranxs-available-languages-message-en\">Sorry, this entry is only available in <a href=\"https:\/\/www.piprojects.net\/de\/wp-json\/wp\/v2\/posts\/298\" class=\"qtranxs-available-language-link qtranxs-available-language-link-de\" title=\"Deutsch\">Deutsch<\/a>.<\/p><p>Ich hab mich die Tage mal beigemacht und mit wbadmin ein Backup erstellt, welches auf eine NAS sichern soll und das t\u00e4glich in einen anderen Ordner. Sobald das Backup fertig ist wird an 3 Emails das Logfile im Zip Format gesendet da mit normal Text der Mailbody versaut wird und man zig mal sieht das irgendwas % gesichert wurde.<!--more--><\/p>\n<p>Als erstes die Abfrage welcher Tag ist heute, dann wird das Ergeniss in DOW (dayofweek) gespeichert und dann f\u00fcr den Ordner als Variable verwendet.<\/p>\n<p><code>REM Abfrage welcher Tag ist heute<br \/>\n@echo on<br \/>\nset DOW=<br \/>\nfor \/f %%g in ('wmic path win32_localtime get dayofweek^|findstr \/v \/r \"^$\"') do (<br \/>\nset DOW=%%g<br \/>\n)<br \/>\nif %DOW%==1 set DOW=Mo<br \/>\nif %DOW%==2 set DOW=Di<br \/>\nif %DOW%==3 set DOW=Mi<br \/>\nif %DOW%==4 set DOW=Do<br \/>\nif %DOW%==5 set DOW=Fr<br \/>\nif %DOW%==6 set DOW=Sa<br \/>\nif %DOW%==7 set DOW=So<br \/>\nmkdir NASBackup%DOW%<br \/>\nREM altes Log l\u00f6schen<br \/>\ndel NASBackupbackuplog.txt<br \/>\nREM neues Logfile erstellen<br \/>\nset logfile=\"NASBackupbackuplog.txt\"<br \/>\necho ########################## %computername%: %date% - %time% &gt;&gt; %logfile%<br \/>\necho. &gt;&gt; %logfile%<br \/>\nREM wbadmin start auf NAS Laufwerk in den entsprechenden Tagesordner mit Kompletter VSS<br \/>\nwbadmin start backup -backuptarget:NASBackup%DOW% -include:C:,D: -vssFull -allCritical -quiet &gt;&gt; %logfile%<br \/>\nset backuperrorlevel=%errorlevel%<br \/>\nif \"%backuperrorlevel%\"==\"0\" (goto end) else (goto fehler)<br \/>\n:fehler<br \/>\necho. &gt;&gt; %logfile%<br \/>\necho. &gt;&gt; %logfile%<br \/>\necho ______________________________ &gt;&gt; %logfile%<br \/>\necho ****************************** &gt;&gt; %logfile%<br \/>\necho ****************************** &gt;&gt; %logfile%<br \/>\necho\u00a0 Ein Fehler ist aufgetreten!!\u00a0 &gt;&gt; %logfile%<br \/>\necho ****************************** &gt;&gt; %logfile%<br \/>\necho ****************************** &gt;&gt; %logfile%<br \/>\necho Errorlevel: %backuperrorlevel% &gt;&gt; %logfile%<br \/>\necho. &gt;&gt; %logfile%<br \/>\necho. &gt;&gt; %logfile%<br \/>\n:end<br \/>\necho. &gt;&gt; %logfile%<br \/>\necho ########################## %computername%: %date% - %time% &gt;&gt; %logfile%<br \/>\necho ########################### Errorlevel: %backuperrorlevel% &gt;&gt; %logfile%<br \/>\necho. &gt;&gt; %logfile%<br \/>\nREM altes Zip vom Logfile l\u00f6schen<br \/>\ndel backuplog.zip<br \/>\nREM mit 7-Zip das neue Logfile als Zip packen<br \/>\ncmd.exe \/C C:\"Program Files\"7-Zip7z a -tzip NASBackupbackuplog.zip NASBackupbackuplog.txt<br \/>\nREM Email Einstellungen zum senden und Empfangen<br \/>\nset EMAIL=absender@domain.net<br \/>\nset SMTP=smtp.domain.net<br \/>\nset USER=smtpuser@domain.net<br \/>\nset PASS=smtppass@domain.net<br \/>\nset TO=empf\u00e4nger@domain.com<br \/>\nset CC=empf\u00e4nger2@domain.com, emf\u00e4nger@domain.de<br \/>\nsendEmail.exe -f %EMAIL% -t %TO% -t %CC% -s %SMTP% -xu %USER% -xp %PASS% -u \"Backup Kunde\" -m \"Logfile %DATE%\" -a Z:backuplog.zip<br \/>\nexit<\/code><\/p>\n<p>Das kleine Tool sendemail.exe gibt es hier &gt;&gt; <a href=\"http:\/\/caspian.dotconf.net\/menu\/Software\/SendEmail\/\">http:\/\/caspian.dotconf.net\/menu\/Software\/SendEmail\/<\/a>\u00a0und 7zip hier &gt;&gt; <a href=\"http:\/\/www.7-zip.org\/\">http:\/\/www.7-zip.org\/<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Sorry, this entry is only available in Deutsch.Ich hab mich die Tage mal beigemacht und mit wbadmin ein Backup erstellt, welches auf eine NAS sichern soll und das t\u00e4glich in einen anderen Ordner. Sobald das Backup fertig ist wird an 3 Emails das Logfile im Zip Format gesendet da mit normal Text der Mailbody versaut [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[],"class_list":["post-298","post","type-post","status-publish","format-standard","hentry","category-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","wpmagazine_modules_lite_featured_media_urls":{"thumbnail":"","cvmm-medium":"","cvmm-medium-plus":"","cvmm-portrait":"","cvmm-medium-square":"","cvmm-large":"","cvmm-small":"","full":""},"categories_names":{"5":{"name":"Windows","link":"https:\/\/www.piprojects.net\/en\/category\/windows\/"}},"tags_names":[],"comments_number":"0","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5ktuF-4O","jetpack-related-posts":[{"id":745,"url":"https:\/\/www.piprojects.net\/en\/dateien-und-verzeichnis-durchsuchen-per-cmd\/","url_meta":{"origin":298,"position":0},"title":"(Deutsch) Dateien und Verzeichnis durchsuchen per cmd","author":"Stefan","date":"Monday January 25th, 2016","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Heute mal was aus der Windows Ecke Ich stand vor der Aufgabe in einem Windows Netz bestimmte Dateien bzw Verzeichnisse zu suchen. Gut ich h\u00e4tte an alle 200 Rechner gehen k\u00f6nnen aber das w\u00e4re ziemlicher Aufwand und zudem w\u00fcrde man die Nutzer vom\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.piprojects.net\/en\/category\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.piprojects.net\/wp-content\/uploads\/2016\/01\/cmd.png?fit=383%2C296&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":8,"url":"https:\/\/www.piprojects.net\/en\/web-hosting-on-banana-pi-with-apache2\/","url_meta":{"origin":298,"position":1},"title":"(Deutsch) Web Hosting on Banana Pi with Apache2","author":"Stefan","date":"Tuesday January 27th, 2015","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Introduction We all know what websites are, right? I hope so, because this is a website, in the form of a blog. Websites now are indispensable part of our lives! From your every day news website to a shopping website, it is awesome\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/images-blogger-opensocial.googleusercontent.com\/gadgets\/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-UgmCY1Og4QY%2FVKQRtNBkT4I%2FAAAAAAAAAYQ%2FzBELIwDkBms%2Fs1600%2Fapache2.png&container=blogger&gadget=a&rewriteMime=image%2F*","width":350,"height":200,"srcset":"https:\/\/images-blogger-opensocial.googleusercontent.com\/gadgets\/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-UgmCY1Og4QY%2FVKQRtNBkT4I%2FAAAAAAAAAYQ%2FzBELIwDkBms%2Fs1600%2Fapache2.png&container=blogger&gadget=a&rewriteMime=image%2F* 1x, https:\/\/images-blogger-opensocial.googleusercontent.com\/gadgets\/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-UgmCY1Og4QY%2FVKQRtNBkT4I%2FAAAAAAAAAYQ%2FzBELIwDkBms%2Fs1600%2Fapache2.png&container=blogger&gadget=a&rewriteMime=image%2F* 1.5x"},"classes":[]},{"id":582,"url":"https:\/\/www.piprojects.net\/en\/usb-bootstick-selbst-erstellen\/","url_meta":{"origin":298,"position":2},"title":"USB Bootstick selbst erstellen","author":"Stefan","date":"Wednesday February  4th, 2015","format":false,"excerpt":"Bootable USB Stick Heute mal ein etwas anderes Thema. Booten vom USB Stick bzw wie man ihn bootbar macht und wozu das gut sein kann. Warum mache ich mir die M\u00fche in Zeiten von Ultimate BootCD oder Hirens? Nun ganz einfach weil es Spa\u00df macht neue Sachen zu testen und\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.piprojects.net\/en\/category\/allgemein\/"},"img":{"alt_text":"2015-02-03-164808_1440x900_scrot","src":"https:\/\/i0.wp.com\/piprojects.net\/wp-content\/uploads\/2015\/02\/2015-02-03-164808_1440x900_scrot-300x188.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":406,"url":"https:\/\/www.piprojects.net\/en\/bananapi-kernel-3-18-rc5\/","url_meta":{"origin":298,"position":3},"title":"BananaPi Kernel-3.18-rc5BananaPi Kernel-3.18-rc5","author":"Stefan","date":"Tuesday November 18th, 2014","format":false,"excerpt":"So nun hier alle meine Schritte f\u00fcr ein funktionierendes Debian Jessie mit Kernel-3.18 (auf die \u00c4nderungen im git werde ich hier nicht eingehen, aber man kann diese sich an im git selbst ansehen und nachverfolgen) Wer keine Lust auf basteln hat hier der Download Ich selbst setze derzeit ein LUbuntu\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":572,"url":"https:\/\/www.piprojects.net\/en\/code-snippet-fuer-dd\/","url_meta":{"origin":298,"position":4},"title":"Code Snippet f\u00fcr ddcode snippet for dd","author":"Stefan","date":"Tuesday January 27th, 2015","format":false,"excerpt":"Heute mal wieder ein kleines St\u00fcck Code f\u00fcr die Konsole. Da ich ja und vermutlich auch Ihr \u00f6fter mal dd nutzt f\u00fcr das Schreiben eines neuen Images auf SD Karte oder mal ein Backup damit erstellt , kann es ziemlich nervig sein wenn man nicht wei\u00df wie lange es noch\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":143,"url":"https:\/\/www.piprojects.net\/en\/nas-auf-band-sichern\/","url_meta":{"origin":298,"position":5},"title":"(Deutsch) NAS auf Band sichern","author":"Stefan","date":"Wednesday April 25th, 2012","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Tjo \u00f6ffter mal was neues :) Heute wurde ich darum gebeten die NAS des Kunden mit in das Backup Konzept aufzunehmen. Klingt ja alles erstmal recht einfach , nur m\u00f6gen weder Symantec BackupExec 2010 noch Acronis ein Netzlaufwerk sichern. Schnelle Idee ich mache\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.piprojects.net\/en\/category\/windows\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":0,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}