backing up with PkZip

Discussion in 'Software' started by Marky Mark, Jul 27, 2005.

  1. Marky Mark

    Marky Mark Private E-2

    Hi guys, I have been sratching my head over this problem for the last few days, so at the risk of me losing all my hair, can someone please help!!!

    Ok, here's what I want/need to do.

    I am helping out a friend who wants me to improve his backing up system for a particular software program that is critical to his business.

    The present backing up system is very simple. It uses pkzip 2.04g and sends the created zip file to a usb stick. Here's the problem but.

    At the moment, each time the backup is performed, the zip file that is created overwrites the previous backup because the zip file name is always the same.

    What I want to be able to do is give the zip file a different name each time a backup is performed. I was thinking of using a dating system e.g 070705, 080705, 090705 which represents the backups done on the 7th, 8th and 9th of July respectively.

    By giving the files different names, at least there is no risk of previous backups being overwritten.

    The problem is, I haven't found a "switch" within pkzip 2.04g that I can use to do this. I tried using the -c switch, but I realised that wasn't useful beacuse it only attaches comments to the files being compressed into the zip file.

    Is there a switch I can use to name the zip file at the point of performing the backup. Or am I going to have to use some funky batch command? (I hope I don't have to use batch commands because I wasted a whole heap of time creating batch commands using the % variable, where the date replaces the %. Yes, it worked, but it requires too much user intervention. I need a system that is idiot proof, i.e. type in date at prompt and press enter).

    Please don't tell me to use an alternative backup program (if possible.)

    Mainly because:
    1. I am very familiar with pkzip.
    2. I don't really want to tinker with the software program too much.

    Please help!!!!!!!!

    Mark
     
    Last edited: Jul 27, 2005
  2. da chicken

    da chicken MajorGeek

    What OS?
     
  3. da chicken

    da chicken MajorGeek

    Actually, just try something like this:
    Karen't Replicator
    Lexun Backup Solution

    Of you can use MS's built-in MS Backup, which isn't the easiest thing to use but you can schedule backups. On WinXP go Start → All Programs → Accessories → System Tools → Backup.

    Those are all free solutions, and all of them allow scheduling.

    Keep in mind that $1 of backup software is worth about $1,000 of recovery software. If the business owner isn't willing to buy a backup solution, then the data must not be that valuable. Something like Backup2005 Pro is pretty good. Or you can get an online backup solution, which effectively creates automatic offsite backups for very little cost ($15 per month for 4GB).
     
  4. Marky Mark

    Marky Mark Private E-2

    OS is Win 98. Like I said, please don't give me endless lists of alternative backup software.

    Thanks
     
  5. da chicken

    da chicken MajorGeek

    Frankly, I cannot think of a backup system more prone to breaking than the one you're currently using. It's a bad system and you need to abandon it.
     
  6. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    If you are stuck on using Pkzip, then buy 2 more USB sticks. Label one as Mon, Wed, Fri. Label another as Tues, Thurs, Sat, and label the other as weekly Sunday. Just pick the right USB stick for the right day of the week and back up to that USB stick. That way you can go back to any day in the previous 2-3 days if anything goes wrong.

    Another idea is to rename your previous backup on your USB stick, before you write another backup to it. This is dangerous if you forget.
    Better still, buy a decent backup program. :D Bazza
     
  7. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    PkZip used to be the defacto standard zipping program back in the the olde DOS days. It is command drive driven and was great for its time. It has quite an array of commands that you could add for various options. Google link

    http://www.google.com/search?hl=en&ie=ISO-8859-1&q=pkzip&btnG=Google+Search

    gives lot of background info.

    Check second link for PkWare, originator Philip Kahn. Bazza
    ===

     
  8. da chicken

    da chicken MajorGeek

    PKZip is a command-line archive utility published by PKWare. Back in it's early days, WinZIP was nothing more than an overlay that send the proper commands to PKZip, until WinZIP wrote their own code to do zipping. You had to install WinZIP, install PKZip, and then configure WinZIP to point to the right directory that had PKZip in it. I'm not even sure WinZIP found PKZip for you automatically.

    PKZip made the .zip file what it is today, because the popular "shareware" version (2.04g) was not crippled and did not expire. The only incentive to register was for business liscencing and redistributing self-extracting zip files, but since these were separate licences and the software was entirely uncrippled people tended to ignore that. The other archive software of the time allowed for extraction only until you paid for it.

    PKZip 2.04g was published in 1993. That's Windows 3.1 days. The documentation references BBS use, and nothing of the WWW. It doesn't even know what a Pentium is; it calls my AMD64 3800+ an 80486. If you Google it with the version number, you can still find it (I found a link on PC World). The current version of PKZip for DOS is 2.50, which is not shareware in any form.

    Looking through the MANUAL.DOC, I see no ability to create dynamic archive names of any kind. The function does not exist. (Amusingly enough, the documentation for the command line add-on for WinZIP 9 uses nearly the exact same switch conventions, thus proving the influence of PKZip.)

    So, being 1993 software, pkzip.exe doesn't understand long filenames. According to the release notes, they did add DPMI support in 2.04e, making it a 32-bit DOS. Being limited to 8.3, you're very limited in creating a descriptive filename. You'd need to create the zip file with PKZip and then rename it.

    Under Windows 2000/XP, the following command works nicely:
    for /f "tokens=2-4* delims=/ " %a in ('DATE /T') do set ZIPDATE=%a%b%c

    You end up with the environment variable ZIPDATE being a number in mmddyyyy format (assuming a US date convention from DATE). Note that there must be a space after delims=/. However, I don't know if MS-DOS 5, 6, or 6.22 recognises the /f switch for the for command. You'd have to test that.

    If it does, you can create a batch file that does this:
    for /f "tokens=2-4* delims=/ " %%a in ('DATE /T') do set ZIPDATE=%%a%%b%%c
    PKZIP -ex U:\backup.zip @filelist.txt
    rename U:\backup.zip %ZIPDATE%-backup.zip
    set ZIPDATE=
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds