Autobackup at system shutdown

With free remote-storage services such as DropBox, there's no excuse for not making regular backup copies of your Win-EQF* logbooks. The backup routine can be automated, to run automatically at system shutdown - without any user interaction at all.

Please note that we won't provide any user support related to Windows issues, DropBox issues, general batch file creation, etc. - the material below is provided for guidance only, to be used entirely at your own risk.

IMPORTANT NOTE: While the routine outlined below works well enough, no files are actually moved from your system to the remote DropBox location until the system is restarted. In other words: no files are copied off-site at system shutdown, the actual upload won't take place until your computer is restarted. This is due to the fact that DropBox' network connection is already shut down when the shutdown script runs.

 

Step 1: Set up a DropBox account

DropBox accounts are provided for FREE, including up to 2 GB of storage space without any cost (conditions subject to change).

Just download the DropBox application, follow the setup instructions - and off you go.

  • In the example below, we'll assume that the DropBox folder is accessed via :
    C:\Documents and Settings\HamRadio\My Documents\Dropbox

  • ...and that the full path to your backup destination folder is :
    C:\Documents and Settings\HamRadio\My Documents\Dropbox\LogBackups

  • We also assume that drive letter Z: is not assigned to any drive. If it is - simply use another drive letter which is not already in use).

 

Step 2: Create a batch file



The batch file, as viewed in a text editor. Any PLAIN TEXT EDITOR (such as NOTEPAD) will do. Click to enlarge.

A batch file is required to perform some very basic error checking (confirming that the DropBox folder is available) and to automate the actual backup task.

In this example, we'll be backing up the logs MainLog and QRPLog (and associated files) - both log files residing in the ..\LOGS subfolder to the Win-EQF* program folder.

The example batch file is included with Win-EQF* (version >= 2.19) and should be edited to accomodate your log file names, etc. We'll save the batch file as LogBackup.BAT in some convenient location. Also create a file called ID.TXT in the backup destination folder - no need to type any sensible text into it, just make sure that the file is present.


@ECHO OFF
CLS

REM Map just about any unused drive letter (Z: in the example below) to your DropBox folder
REM using the SUBST command (first deleting any SUBST'ed drive already mapped to Z:) :
SUBST Z: /D
SUBST Z: C:\"Documents and Settings"\HamRadio\"My Documents"\Dropbox\LogBackups

REM ID.TXT is just an empty text file residing in the backup destination folder - if we can
REM reach it, we'll probably be able to squeeze in some backup files to the same destination:
IF NOT EXIST Z:\ID.TXT GOTO END

REM Perform backup of two Win-EQF* logs -- from whatever drive/folder you have installed
REM Win-EQF* to -- in this example, C:\HamRadio\Win-EQF
C:
CD C:\HamRadio\Win-EQF
BACKUP MainLog Z:\
BACKUP QRPLog Z:\

REM Remove the SUBST'ed Z: drive:
SUBST Z: /D

:END

 

 

Step 3: Invoke your batch file at system shutdown



Start > Run, then type in GPEDIT.MSC



Computer Configuration > Windows Settings > Scripts.



Select "Shutdown".



Select "Add".



Browse to/enter the path & name of the desired batch file.



Click OK to close the dialog.

This example is based on Windows XP. If you're running Windows VISTA or Windows 7, it is likely that you'll have to follow a slightly different procedure.

  1. Click the START button and select RUN.
    In the text box, type in GPEDIT.MSC and hit Enter / click OK.

  2. Select Computer Configuration, Windows Settings, Scripts (Startup/Shutdown).

  3. Double-click on Shutdown.

  4. Click Add and browse to the script file (LogBackup.BAT - whereever you stored the file).

  5. Click OK (twice) to close the two open dialogs.

  6. Close the Group Policy Editor and restart the computer. Verify that the backup files are actually stored in the desired location. 

 

 

<< Return to FAQ