https://wiki.roy-bohn.de/index.php?title=DrivePolling&feed=atom&action=history DrivePolling - Versionsgeschichte 2024-03-28T23:51:44Z Versionsgeschichte für diese Seite in Programmers Guide MediaWiki 1.15.2 https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=377&oldid=prev Roy um 07:01, 2. Nov. 2010 2010-11-02T07:01:15Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 07:01, 2. Nov. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 15:</td> <td colspan="2" class="diff-lineno">Zeile 15:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#/etc/backup-platten-polling</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#/etc/backup-platten-polling</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">#folder to check for drives</ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">lock=&quot;/var/lock/&quot;</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">#this is the device ID</ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>platte1=&quot;usb-BUFFALO_HD-PXU2_001010070301C5160-0:0-part1&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>platte1=&quot;usb-BUFFALO_HD-PXU2_001010070301C5160-0:0-part1&quot;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">#folder to store the lock files (lock files named by id)</ins></div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">lock=&quot;/var/lock/&quot;</ins></div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">#mail-recipient</ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mailadresse=&quot;script@firma.de&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mailadresse=&quot;script@firma.de&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if ls -l| grep &quot;$platte1&quot;&gt;/dev/null</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>if ls -l| grep &quot;$platte1&quot;&gt;/dev/null</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> then</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> then</div></td></tr> <tr><td colspan="2" class="diff-lineno">Zeile 52:</td> <td colspan="2" class="diff-lineno">Zeile 55:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/source&gt; &nbsp;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/source&gt; &nbsp;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>[[Category:Bash]] [[Category:Ubuntu]]</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>[[Category:Bash]][[Category:Ubuntu]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <!-- diff generator: internal 2024-03-28 23:51:44 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=376&oldid=prev Roy um 06:58, 2. Nov. 2010 2010-11-02T06:58:30Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 06:58, 2. Nov. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 50:</td> <td colspan="2" class="diff-lineno">Zeile 50:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exit 0</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exit 0</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;/source&gt;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&lt;/source&gt; &nbsp;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">[[Category:Bash]][[Category:Ubuntu]]</ins></div></td></tr> <!-- diff generator: internal 2024-03-28 23:51:44 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=375&oldid=prev Roy um 06:57, 2. Nov. 2010 2010-11-02T06:57:45Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 06:57, 2. Nov. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 9:</td> <td colspan="2" class="diff-lineno">Zeile 9:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;source lang=&quot;bash&quot;&gt;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;source lang=&quot;bash&quot;&gt;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#/etc/backup-platten-polling</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#/etc/backup-platten-polling</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td></tr> <tr><td colspan="2" class="diff-lineno">Zeile 44:</td> <td colspan="2" class="diff-lineno">Zeile 46:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> echo &quot;pl 1 nix zu tun&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> echo &quot;pl 1 nix zu tun&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> fi</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> fi</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>fi</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>fi</div></td></tr> <!-- diff generator: internal 2024-03-28 23:51:44 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=374&oldid=prev Roy um 06:56, 2. Nov. 2010 2010-11-02T06:56:36Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 06:56, 2. Nov. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 9:</td> <td colspan="2" class="diff-lineno">Zeile 9:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&lt;source lang=&quot;bash&quot;&gt;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">&lt;br&gt; </del>&lt;source lang=&quot;bash&quot;&gt;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">#</ins></div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">#/etc/backup-platten-polling</ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td></tr> <!-- diff generator: internal 2024-03-28 23:51:44 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=373&oldid=prev Roy um 06:55, 2. Nov. 2010 2010-11-02T06:55:27Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Nächstältere Version</td> <td colspan='2' style="background-color: white; color:black;">Version vom 06:55, 2. Nov. 2010</td> </tr> <tr><td colspan="2" class="diff-lineno">Zeile 10:</td> <td colspan="2" class="diff-lineno">Zeile 10:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. &nbsp;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;br&gt; &nbsp;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&lt;br&gt; &lt;source lang=&quot;bash&quot;&gt;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;source lang=&quot;bash&quot;&gt;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>#!/bin/bash</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>device=&quot;/dev/disk/by-id/&quot;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>lock=&quot;/var/lock/&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>platte1=&quot;usb-BUFFALO_HD-PXU2_001010070301C5160-0:0-part1&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>platte1=&quot;usb-BUFFALO_HD-PXU2_001010070301C5160-0:0-part1&quot;</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">platte2=&quot;usb-BUFFALO_HD-PXU2_0010100703010DD10-0:0-part1&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mailadresse=&quot;script@firma.de&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>mailadresse=&quot;script@firma.de&quot;</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td colspan="2" class="diff-lineno">Zeile 46:</td> <td colspan="2" class="diff-lineno">Zeile 44:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> echo &quot;pl 1 nix zu tun&quot;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> echo &quot;pl 1 nix zu tun&quot;</div></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> fi</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div> fi</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">cd $device</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">fi</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">if ls -l| grep &quot;$platte2&quot;&gt;/dev/null</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> then</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> echo &quot;Platte 2 verbunden&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> cd $lock</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; if ls -l|grep &quot;$platte2&quot;&gt;/dev/null</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;pl 2 nothing to do&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;pl 2 file anlegen&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> echo &quot;Zweite Backup-Platte wurde erfolgreich verbunden und die Nacht zum Backup herangezogen.&quot; | mail -s &quot;Festplatte 2 verbunden&quot; $mailadresse</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; touch &quot;$platte2&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; fi</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">cd $device</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">else</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> echo &quot;Platte 2 getrennt&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"> cd $lock</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; if ls -l|grep &quot;$platte2&quot;&gt;/dev/null</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; then</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;pl 2 auswerfen&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rm &quot;$platte2&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;Zweite Backup-Platte wurde getrennt.&quot; | mail -s &quot;Festplatte 2 getrennt&quot; $mailadresse</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;pl 2 nix zu tun&quot;</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">&nbsp; &nbsp; &nbsp; &nbsp; fi</del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd $device</div></td></tr> <tr><td colspan="2" class="diff-lineno">Zeile 79:</td> <td colspan="2" class="diff-lineno">Zeile 49:</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exit 0</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>exit 0</div></td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'>-</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&nbsp;</td></tr> <tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/source&gt;</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/source&gt;</div></td></tr> <!-- diff generator: internal 2024-03-28 23:51:44 --> </table> Roy https://wiki.roy-bohn.de/index.php?title=DrivePolling&diff=372&oldid=prev Roy:&#32;Die Seite wurde neu angelegt: „= Script to Check if Disk Status Changes = Run this Script in the Local Crontab:<br> <source lang="bash"> crontab -e #*/5 * * * * root bash /etc/backup-p…“ 2010-11-02T06:37:41Z <p>Die Seite wurde neu angelegt: „= Script to Check if Disk Status Changes = Run this Script in the Local Crontab:&lt;br&gt; &lt;source lang=&quot;bash&quot;&gt; crontab -e #*/5 * * * * root bash /etc/backup-p…“</p> <p><b>Neue Seite</b></p><div>= Script to Check if Disk Status Changes =<br /> <br /> Run this Script in the Local Crontab:&lt;br&gt; &lt;source lang=&quot;bash&quot;&gt;<br /> crontab -e<br /> #*/5 * * * * root bash /etc/backup-platten-polling &gt; /dev/null 2&gt;&amp;1<br /> &lt;/source&gt; &lt;br&gt; <br /> <br /> If the online Status changes, the script create or delete the lock file in /var/lock/ <br /> <br /> If the lockfile is available, you can [[ScriptBackup|Backup Data]] or use the disk for other work. <br /> <br /> &lt;br&gt; <br /> &lt;source lang=&quot;bash&quot;&gt;<br /> #!/bin/bash<br /> <br /> device=&quot;/dev/disk/by-id/&quot;<br /> <br /> lock=&quot;/var/lock/&quot;<br /> platte1=&quot;usb-BUFFALO_HD-PXU2_001010070301C5160-0:0-part1&quot;<br /> platte2=&quot;usb-BUFFALO_HD-PXU2_0010100703010DD10-0:0-part1&quot;<br /> mailadresse=&quot;script@firma.de&quot;<br /> cd $device<br /> <br /> if ls -l| grep &quot;$platte1&quot;&gt;/dev/null<br /> then<br /> echo &quot;Platte 1 verbunden&quot;<br /> cd $lock<br /> if ls -l|grep &quot;$platte1&quot;&gt;/dev/null<br /> then<br /> echo &quot;pl 1 nothing to do&quot;<br /> else<br /> echo &quot;pl 1 file anlegen&quot;<br /> echo &quot;Erste Backup-Platte wurde erfolgreich verbunden und die Nacht zum Backup herangezogen.&quot; | mail -s &quot;Festplatte 1 verbunden&quot; $mailadresse<br /> touch &quot;$platte1&quot;<br /> fi<br /> cd $device<br /> else<br /> echo &quot;Platte 1 getrennt&quot;<br /> cd $lock<br /> if ls -l|grep &quot;$platte1&quot;&gt;/dev/null<br /> then<br /> echo &quot;pl 1 auswerfen&quot;<br /> rm &quot;$platte1&quot;<br /> echo &quot;Erste Backup-Platte wurde getrennt.&quot; | mail -s &quot;Festplatte 1 getrennt&quot; $mailadresse<br /> else<br /> echo &quot;pl 1 nix zu tun&quot;<br /> fi<br /> <br /> cd $device<br /> fi<br /> <br /> if ls -l| grep &quot;$platte2&quot;&gt;/dev/null<br /> then<br /> echo &quot;Platte 2 verbunden&quot;<br /> cd $lock<br /> if ls -l|grep &quot;$platte2&quot;&gt;/dev/null<br /> then<br /> echo &quot;pl 2 nothing to do&quot;<br /> else<br /> echo &quot;pl 2 file anlegen&quot;<br /> echo &quot;Zweite Backup-Platte wurde erfolgreich verbunden und die Nacht zum Backup herangezogen.&quot; | mail -s &quot;Festplatte 2 verbunden&quot; $mailadresse<br /> touch &quot;$platte2&quot;<br /> fi<br /> cd $device<br /> else<br /> echo &quot;Platte 2 getrennt&quot;<br /> cd $lock<br /> if ls -l|grep &quot;$platte2&quot;&gt;/dev/null<br /> then<br /> echo &quot;pl 2 auswerfen&quot;<br /> rm &quot;$platte2&quot;<br /> echo &quot;Zweite Backup-Platte wurde getrennt.&quot; | mail -s &quot;Festplatte 2 getrennt&quot; $mailadresse<br /> else<br /> echo &quot;pl 2 nix zu tun&quot;<br /> fi<br /> <br /> cd $device<br /> fi<br /> <br /> exit 0<br /> <br /> <br /> &lt;/source&gt;</div> Roy