<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>USB on Much Ado About IT</title><link>https://it.knightnet.org.uk/tags/usb/</link><description>
Recent content about USB from Much Ado About IT |
Ramblings and rantings from IT Architect &amp; Designer, Julian Knight</description><generator>Hugo | gohugo.io | Theme twenty-sixteen</generator><language>en-gb</language><copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright><lastBuildDate>Mon, 24 Apr 2023 21:27:28 +0000</lastBuildDate><atom:link href="https://it.knightnet.org.uk/tags/usb/feed.xml" rel="self" type="application/rss+xml"/><item><title>Automatically Backing up a USB Drive with RSYNC (KDE)</title><link>https://it.knightnet.org.uk/2008/08/automatically-backing-up-a-usb-drive-with-rsync-kde.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2008/08/automatically-backing-up-a-usb-drive-with-rsync-kde.html</guid><pubDate>Thu, 14 Aug 2008 01:22:00 +0000</pubDate><guid>https://it.knightnet.org.uk/2008/08/automatically-backing-up-a-usb-drive-with-rsync-kde.html</guid><description><div/><div>&lt;p>USB Drives of all kinds need to be backed up and the best backup is an automatic one (it’s the only way to make sure that it gets done!).&lt;/p>
&lt;p>So here is one recipe for doing just that using RSYNC and some BASH scripting magic.&lt;/p>
&lt;p>I’ve split this into two files. You don’t have to do this of course and one may well be better for you. I used two because I can run the second one manually as well. Put everything in autorun.sh if you want to backup each drive individually, however, note that KDE produces an annoying extra dialog (a security warning) asking if you really want to run the autorun.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>autorun.sh&lt;/p>
&lt;p>This resides in the root of the USB drive and is executed automatically by KDE when the drive is detected (though not if the drive is attached when booting)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>usb-backup-manual.sh&lt;/p>
&lt;p>This is a bit of a nasty hack, I have manually configured a list of drives that might be attached so that I can back them all up together. Not elegant but it works for me.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="autorunsh">autorun.sh&lt;/h4>
&lt;!-- raw HTML omitted -->
&lt;!-- raw HTML omitted -->
&lt;p>Note the use of KDialog to provide a minimal GUI. In the second file, KDialog produces a progress bar.&lt;/p>
&lt;p>Also note the RSYNC parameters. These are always painful to get to grips with so it is nice to have an example to work from. In this case I am backing up so I am making sure that the backup is an exact copy of the original (as opposed to synchronising which would allow changes to happen on either side).&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/development">Development</category><category domain="https://it.knightnet.org.uk/categories/linux">Linux</category><category domain="https://it.knightnet.org.uk/tags/backup">Backup</category><category domain="https://it.knightnet.org.uk/tags/bash">BASH</category><category domain="https://it.knightnet.org.uk/tags/batch">Batch</category><category domain="https://it.knightnet.org.uk/tags/scripting">Scripting</category><category domain="https://it.knightnet.org.uk/tags/usb">USB</category></item><item><title>Enabling VirtualBox access to USB ports (OpenSUSE 11.0)</title><link>https://it.knightnet.org.uk/2008/07/enabling-virtualbox-access-to-usb-ports-opensuse-11-0.html</link><guid isPermaLink="true">https://it.knightnet.org.uk/2008/07/enabling-virtualbox-access-to-usb-ports-opensuse-11-0.html</guid><pubDate>Fri, 18 Jul 2008 06:25:00 +0000</pubDate><guid>https://it.knightnet.org.uk/2008/07/enabling-virtualbox-access-to-usb-ports-opensuse-11-0.html</guid><description><div/><div>&lt;p>By default, OpenSUSE 10 &amp;amp; 11 come preconfigured WITHOUT usbfs active. Unlike Ubuntu, everything is ready to go but the fstab setting is “noauto” so it doesn’t seem to get loaded even when VirtualBox wants it.
The fix for this is simple and is listed in the [VirtualBox User FAQ][1]. In “&lt;code>/etc/fstab&lt;/code>” change the line for usbfs to:
usbfs /proc/bus/usb usbfs auto,busgid=XXX,busmode=0775,devgid=XXX,devmode=0664 0 0
Where XXX is the group id of the vboxusers group which can be discovered in YAST or from the command line:
grep vboxusers /etc/group
That’s it, no other changes should be needed.&lt;/p>
&lt;p>Now mount it with:
mount usbfs
(All of these commands and edits have to be done by root or sudo).&lt;/p>
&lt;p>OpenSUSE 11.0 does not automatically mount the usbfs on reboot so either do it manually after a reboot and before using VirtualBox or find a way to activate it automatically (and let me know hey? 😉
&lt;!-- raw HTML omitted -->Update 2008-08-17&lt;!-- raw HTML omitted -->: Thanks to “[timdor][2]” from the [OpenSUSE Forums][3] who lets me know a way of automatically mounting usbfs.&lt;/p>
&lt;p>“To mount usbfs at boot add ‘&lt;code>mount usbfs&lt;/code>‘ without the quote marks to &lt;code>/etc/init.d/boot.local&lt;/code>“. Thanks timdor.
[1]: &lt;a href="http://www.virtualbox.de/wiki/User_FAQ">http://www.virtualbox.de/wiki/User_FAQ&lt;/a>
[2]: &lt;a href="http://forums.opensuse.org/members/timdor.html">http://forums.opensuse.org/members/timdor.html&lt;/a>
[3]: &lt;a href="http://www.blogger.com/To%20mount%20usbfs%20at%20boot%20add%20%22mount%20usbfs%22%20without%20the%20quote%20marks%20to%20/etc/init.d/boot.local">http://www.blogger.com/To%20mount%20usbfs%20at%20boot%20add%20%22mount%20usbfs%22%20without%20the%20quote%20marks%20to%20/etc/init.d/boot.local&lt;/a>&lt;/p></div></description><author>Julian Knight</author><category domain="https://it.knightnet.org.uk/categories/virtualisation">Virtualisation</category><category domain="https://it.knightnet.org.uk/tags/opensuse">OpenSUSE</category><category domain="https://it.knightnet.org.uk/tags/usb">USB</category><category domain="https://it.knightnet.org.uk/tags/virtualbox">VirtualBox</category></item></channel></rss>