topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:35 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: usb drive backup program  (Read 26284 times)

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
IDEA: usb drive backup program
« on: March 20, 2010, 04:48 PM »
Not sure this exist but haven't found it yet here on dc or by googling.

I am looking for a small program that would provide to sync my usb drive to my local hard drive.  It needs to compress it but by using the normal compression methods, nothing special.

It also needs to pop up a window before auto syncing to ask me if I want to sync.  Sometimes I may want to copy or add a file rather than syncing.

Perhaps syncing isn't the right word here, not sure.

If such a program exist, it needs to be free.

Any takers??
« Last Edit: March 20, 2010, 05:16 PM by techidave »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #1 on: March 20, 2010, 05:53 PM »
I would check into FreeCommander portable:
http://www.freecomma...der.com/fc_u3_en.htm

It's not "automatic" sync.  What it does is you compare 2 folders with or without subfolder inclusion.  It shows which way copies would go of each file with an arrow.  You can delete entries if you don't want a particular one to be copied.  You hit the Sync button and all the copies commence.  If you just want to copy particular files without using the Sync feature, you highlight them and hit F5 or use drag & drop. 2 Folder panes are visible so F5 would copy to the other pane.  You can have multiple tabs on each side.

Plus it has "Layouts" which are collections of tabs.  You can set up folders you would often sync in a Layout.  A typical syncing session for me is select Web from the layouts, Compare, Sync... select Source Code from the Layouts, Compare, Sync.

2 Folders synced with subfolders included in about 6 clicks.
It's free and I've been using it for years.  Very reliable.
Also does other stuff like ftp client.
You can use some external file copy utilities instead of Explorer copy
such as TeraCopy and a couple of others.
« Last Edit: March 20, 2010, 05:56 PM by MilesAhead »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #2 on: March 20, 2010, 06:12 PM »
It needs to compress it

Aren't syncing & compressing incompatible as such - I mean it becomes a backup then doesnt it - I'm not sure how much the terminology matters, but if compression is important there are probably free backup apps that will do (some of) what you want..
Tom

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #3 on: March 20, 2010, 07:54 PM »
I want the compression just to save space on my hard drive.  I have a 16gb pen drive and would like for the sync or backup to take up as little space as possible on my hard drive.  It seems that I hardly make a copy of my pen drive somewhere and then the drive dies and I am out of luck.

And I don't want something that does "a lot" of things, just my bare necessities. 

Miles, I will check out your Free Commander but it may do more than I want.  Plus, I want something that will be automatic after I say yes I want to make a backup or sync.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #4 on: March 20, 2010, 08:09 PM »
I wonder if someone could just make a little script that creates an archive of the entire USB drive and saves it to a customizable folder (changed in settings.ini or something) and then you could just place the compiled script, settings, and an autorun.inf right on the USB drive so that when you insert it, auto-run will run the script.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #5 on: March 20, 2010, 10:00 PM »
Thanks Deozaan, you took the words right out of my mouth.  Sorry it took so long!   :P :D

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #6 on: March 20, 2010, 11:54 PM »
How 'bout just using 7zip to compress the entire USB contents to a zip file on the HD? That's about as simple as it gets.


techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #7 on: March 21, 2010, 06:35 AM »
That could work except there wouldn't be a reminder to let it run or not.  My work requires that I work on many computers through out the day so I am plugging it in to the same computer several times per day.  but this would only run on certain machines and not on every one.

A coder I am not, which is why I posted this request.

sajman99

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 664
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #8 on: March 21, 2010, 12:51 PM »
techidave--not sure if the portable app Toucan would be sufficient for you, but it does sound promising...

Four synchronisation modes, copy, update, mirror and equalise.
Backup and restore in industry standard zip and 7-zip files, with support for complete backups, updating existing backups and differential backups, as well as restoring files from an archive.
AES-256 encryption using ccrypt
Command line support, allows you to create a batch file for repeated jobs
Variables, point to places on you USB drive no matter what its drive letter is

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #9 on: March 21, 2010, 02:41 PM »
I tried Toucan and could get the sync part to work (won't compress though) but the backup part wouldn't recognize my flash drive though.  Windows would and the sync part would recognize it.

I guess I didn't figure this would be this big of deal, and would be rather quick and simple to do.   :(


Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #10 on: March 21, 2010, 03:16 PM »
I downloaded a portable version of 7-zip and unpacked it on my USB stick, then created the following (simple) BATCH script:
Code: ActionScript [Select]
  1. @ECHO off
  2. REM --- Purpose of script: automatically create small 7-zip archive from all files on USB stick. ----------------------------------
  3. REM -----------------------------------------------------------------------------------------------------------------------------
  4. REM --- 01. - Type which drive letter is assigned to USB stick. -----------------------------------------------------------------
  5. ECHO -
  6. ECHO    step 1: Type drive letter assigned to USB stick, for example: C
  7. ECHO ---------------------------------------------------------------------
  8. ECHO
  9. SET /P driveLetter=[USB drive letter]
  10. REM GOTO :EOF
  11. GOTO Step2
  12. REM
  13. REM -----------------------------------------------------------------------------------------------------------------------------
  14. REM --- 02. - Initializing the folders for getting and creating the archives (user definable). ----------------------------------
  15. :Step2
  16. ECHO -
  17. ECHO    step 2: Initializing required parameters
  18. ECHO ---------------------------------------------------------------------
  19. REM --- note: date notation depends on regional settings from the system the script is executed on (current = Dutch!). ----------
  20. REM --- current = Dutch on WinXP US ---------------------------------------------------------------------------------------------
  21. SET     year=%date:~9,4%
  22. SET    month=%date:~6,2%
  23. SET      day=%date:~3,2%
  24. REM --- current = US on WinXP US ------------------------------------------------------------------------------------------------
  25. REM SET     year=%date:~10,4%
  26. REM SET    month=%date:~7,2%
  27. REM SET      day=%date:~4,2%
  28. REM --- current = US on WinXP NL ------------------------------------------------------------------------------------------------
  29. REM SET     year=%date:~6,4%
  30. REM SET    month=%date:~3,2%
  31. REM SET      day=%date:~0,2%
  32. REM --- the order from the work date should always be the same (according to my preference) -------------------------------------
  33. SET workDate=%year%-%month%-%day%
  34. SET usbFolder="%driveLetter%:\"
  35. SET archiveFolder=C:\Archive
  36. SET recentArchive=%archiveFolder%\USB_%workDate%
  37. ECHO              USB drive: %usbFolder%
  38. ECHO  Archive file and path: %recentArchive%
  39. REM GOTO :EOF
  40. GOTO Step3
  41. REM
  42. REM -----------------------------------------------------------------------------------------------------------------------------
  43. REM --- 03 - Create the archive in the archive folder (-mx=9 is most extreme setting). ------------------------------------------
  44. :Step3
  45. ECHO -
  46. ECHO step 3: Creating archive %recentArchive%
  47. ECHO ---------------------------------------------------------------------
  48. "%driveLetter%:\7-ZipPortable\App\7-zip\7z.exe" a -t7z %recentArchive%.7z %driveLetter%:\* -w%archiveFolder% -mx=9

or get the script from here [attachment]


It works on my XP and Win7 system, but please bear in mind that it was whipped up in 5 minutes, so there will be a lot of points for improvement.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #11 on: March 21, 2010, 04:32 PM »
Thanks Shades for the script.  I have d/l it and have edited the script to the best of my ability.  But the script doesn't complete.  see attached screenshot.  I am placing the script here too.  I think it is line 48(last line before the pause) that needs to be edited but I don't know what to.

@ECHO off
REM --- Purpose of script: automatically create small 7-zip archive from latest files on USB stick. -----------------------------
REM -----------------------------------------------------------------------------------------------------------------------------
REM --- 01. - Type which drive letter is assigned to USB stick. -----------------------------------------------------------------
ECHO -
ECHO    step 1: Type drive letter assigned to USB stick, for example: C
ECHO ---------------------------------------------------------------------
ECHO
SET /P driveLetter=[USB drive letter]
REM GOTO :EOF
GOTO Step2
REM
REM -----------------------------------------------------------------------------------------------------------------------------
REM --- 02. - Initializing the folders for getting and creating the archives (user definable). ----------------------------------
:Step2
ECHO -
ECHO    step 2: Initializing required parameters
ECHO ---------------------------------------------------------------------
REM --- note: date notation depends on regional settings from the system the script is executed on (current = Dutch!). ----------
REM --- current = Dutch on WinXP US ---------------------------------------------------------------------------------------------
SET     year=%date:~9,4%
SET    month=%date:~6,2%
SET      day=%date:~3,2%
REM --- current = US on WinXP US ------------------------------------------------------------------------------------------------
REM SET     year=%date:~10,4%
REM SET    month=%date:~7,2%
REM SET      day=%date:~4,2%
REM --- current = US on WinXP NL ------------------------------------------------------------------------------------------------
REM SET     year=%date:~6,4%
REM SET    month=%date:~3,2%
REM SET      day=%date:~0,2%
REM --- the order from the work date should always be the same (according to my preference) -------------------------------------
SET workDate=%year%-%month%-%day%
SET usbFolder="%driveLetter%:\"
SET archiveFolder=C:\Kingston Backup 16gb
SET recentArchive=%archiveFolder%\USB_%workDate%
ECHO              USB drive: %usbFolder%
ECHO  Archive file and path: %recentArchive%
REM GOTO :EOF
GOTO Step3
REM
REM -----------------------------------------------------------------------------------------------------------------------------
REM --- 03 - Create the archive in the archive folder (-mx=9 is most extreme setting). ------------------------------------------
:Step3
ECHO -
ECHO step 3: Creating archive %recentArchive%
ECHO ---------------------------------------------------------------------
"%driveLetter%:\7-ZipPortable\App\7-zip\7z.exe" a -t7z %recentArchive%.7z %driveLetter%:\* -w%archiveFolder% -mx=9

pause

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #12 on: March 21, 2010, 04:39 PM »
It looks to me like something is wrong with the workDate. What should be "2010-03-21" is showing up as "201-/2- 0"

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #13 on: March 21, 2010, 04:44 PM »
I saw that too but don't know where to change it at.

Oh, maybe I need to REM out the Dutch settings and then unREM (?) the US settings???

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #14 on: March 21, 2010, 04:49 PM »
Ok, I got farther after changing the script but still get this error.  I think that last line with the %recent and that kind of stuff needs edited now.  But to what??

-
   step 1: Type drive letter assigned to USB stick, for example: C
---------------------------------------------------------------------
ECHO is off.
[USB drive letter]e
-
   step 2: Initializing required parameters
---------------------------------------------------------------------
             USB drive: "e:\"
 Archive file and path: C:\Kingston Backup 16gb\USB_2010-21-03
-
step 3: Creating archive C:\Kingston Backup 16gb\USB_2010-21-03
---------------------------------------------------------------------

7-Zip 4.65  Copyright (c) 1999-2009 Igor Pavlov  2009-02-03
Scanning


16gb:  WARNING: The system cannot find the file specified.

16gb:  WARNING: The system cannot find the file specified.



Creating archive C:\Kingston.7z



Error:
Duplicate filename:
backup
backup
Press any key to continue . . .

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #15 on: March 21, 2010, 04:51 PM »
I was really hoping for a GUI front end so I wouldn't have to deal with this.   :-[ :(

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #16 on: March 21, 2010, 06:06 PM »
Is there a chance that it doesn't like the spaces in the path? i.e. "c:\Kingston Backup 16gb\" as opposed to something like "C:\Kingston\" or "C:\Kingston_Backup_16GB\"?

I wish I could help more. I don't know much about the special command prompt commands, and nothing about commandline commands for 7-zip.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #17 on: March 21, 2010, 06:19 PM »
Don't know but I suppose that could be true.  I don't know much about that stuff either.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #18 on: March 21, 2010, 06:25 PM »
That must have been it... the spaces that is.  now it is working. 

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #19 on: March 21, 2010, 06:50 PM »
Cool. This may also be useful to you to get it to launch automatically when you insert the USB drive:

http://dailycupoftec...autoruninf-tweaking/

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #20 on: March 21, 2010, 06:54 PM »
It may also be that putting the path in quotes will fix the whitespace problem:

SET archiveFolder="C:\Kingston Backup 16gb"

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #21 on: March 21, 2010, 07:07 PM »
Check out Sarah Dean's USB Flash Tools

USBFlashTools.png USBFlashTools_Backup.png

Also, search the net for USBDumper. If you can't find a download source, let me know and I'll make my copy available for download.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #22 on: March 21, 2010, 07:13 PM »
thanks for the help deozaan.  I appreciate it.

I didn't realize this whole ordeal was going to be this difficult or involved.  I figured that some of the coders here would whip something up in a short order without me trying to troubleshoot several programs getting it to work.  As you can tell, programming or coding is not my strong area.

I don't know if shades script has the ability to do copy only the changes that were made on the usb drive instead of copying the whole thing everytime.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,747
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #23 on: March 21, 2010, 07:40 PM »
I don't know if shades script has the ability to do copy only the changes that were made on the usb drive instead of copying the whole thing everytime.

This sounds quite a bit more involved, requiring some sort of Diff utility to compare the contents of the old backup(s) to the current file. And if it created a new zip of just the changes, then it would have to compare every zipped backup to the USB drive every time it was inserted, and that sounds like a big mess of trouble to me.

It almost sounds to me that something like FileHamster would be better for you, if you could figure out a way to get it to work only with your USB drive (such as somehow ensuring that your Kingston 16GB USB drive is always assigned the same drive letter, and nothing else can use that drive letter).

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: IDEA: usb drive backup program
« Reply #24 on: March 21, 2010, 08:38 PM »
Found the link for USB Dumper

http://www.ghacks.ne...connections-windows/