Even though USB memory sticks are quite reliable, there still is the risk of losing it, or even worse, that somebody might steal it from you. The data, you store on your memory stick is probably vital to you; otherwise you wouldn't bring it with you always. Hence, it is important to backup your memory stick regularly and make sure that nobody is able to access the data on it, if it gets into the wrong hands. It is certainly no solution to just copy all files manually every now and then. It is the first law of any backup strategy: Never backup manually! The reason is obvious. It is easily forgotten, and the probability is high that if you ever need the backup its data is outdated.

To secure the data on an USB stick, you have to encrypt it. Many memory sticks come with encryption software. However, it is not advisable to use it. Usually, one doesn't know what encryption algorithm was used, and if it was correctly implemented.

My favorite encryption software is the Open Source tool TrueCrypt. It is a well-known program that is very easy to use. If a security leak was found in it, you'll will probably read about it somewhere, and an update will be available shortly afterwards. You certainly don't have this guarantee for encryption software that was delivered with your USB stick. Please check out my review about TrueCrypt to learn more about this nifty tool.

Update: Please, also check out my review about TrueCrypt 5.

Another advantage of using TrueCrypt is that it simplifies backups because all your data will be stored in just one file. So you only have to make sure that this file is copied regularly to your hard disk. And if your stick contains confidential data, your backup will be automatically encrypted, too.

The best time to backup your USB stick is whenever you plug it into your PC. If you use the stick on your PC at home and at work, you'll always have a copy of your data on both computers. To start the backup automatically when you insert the USB stick, you have to create a file named autorun.inf in its root directory with the following contents:

[autorun]
open=autorun.bat
action=Backup

On a Vista machine this will automatically start autrun.bat whenever you connect the USB stick. On a computer with Windows XP, a window will be opened where you can launch the batch file.

TrueCrypt has one disadvantage. You have to specify the size of the TrueCrypt file in advance. The size of this file is always the same even though you only use a fraction of its capacity. So it can take some time until the file is copied to your hard disk. The size of my TrueCrypt file is 1GB. With my stick, it only takes a couple of seconds to copy the file. However, if you want to use a larger file or your stick is slow, you might want to run the backup only if you know that you changed the data on it. The following batch file which should be named autorun.bat solves this problem:

@ECHO OFF
ECHO 1. Backup USB stick
ECHO 2. Quit
set /p choice=
IF '%choice%' == '2' GOTO QUIT
IF '%choice%' == '1' GOTO BACKUP
:BACKUP
copy stick.tc "%userprofile%\my documents"
:QUIT

In this example, I assumed that you named your TrueCrypt file stick.tc. If you choose "1", it will be copied to your documents folder and if you select "2", no backup will be performed. Of course, you can copy your backup to any other folder.

A nice side effect of this backup solution is that if you ever forget your USB stick at work, you'll have at least the last version of your data at home. But if you want to make sure that you'll always have your memory stick with you, then you should check out this post: Never forget your memory stick.

4 Comments
  1. Ron 14 years ago

    Autorun is "nice", but it is also a security hole. A commonly suggested security procedure is to disable autorun on USB and CD/DVD.

    If you do nothing else to limit what programs are allowed to autorun, then anything can run, including malware on the USB device.

    I have used a similar process to the one you described except that I used batch files instead of autoruns'. The batch file was setup with the following four manually triggered processes (paragraphs/steps).

    Plug USB into Work machine - copy transported working files/folders to work machine/lan. For faster access to files than USB and to reduce "wear" on the flash memory?

    End of Work day - copy files/folders to be transported to USB device

    Plug USB into home machine - copy transported files /folders (presumes different drive mapping)

    End of Home day - copy files/folders to be transported to USB Device

    I have the batch file plus 3 shortcuts which pass batch parameters to branch appropriate batch commands.

    This approach requires that I remember to click on the appropriate shortcut on the USB, but since I need access to the files, I tend to remember it easily enough. I just got into the habit.

  2. Ron, you’re right, autorun is a security risk. But that applies to any auto starting program. Manual backups are a risk as well. If you lose important data because of an outdated backup, it might be worse than starting a virus that will be caught by your antivirus software anyway. Most people simply forget to create a backup on a daily basis.

  3. Melody 13 years ago

    Thank you for this useful trick. As a PhD student, fear of losing the data on my USB stick has always been a nightmare. Today I decided to do something about it and that's why by a google search I ended up here.

    My USB stick already has autorun.inf

    Could you please tell me what I should do?

  4. jace 10 years ago

    The irony that this would use autorun and be called secure! I would rather lose important documents than have my computer catch a virus that may or may not be caught by my av, av is definitely not perfect.

Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account