"Michael D. Kirkpatrick" wrote:
> 
> I have a 4 gig and a 27 gig hard drive on my web server.  Everything is
> ran off of the 4 gig hard drive.  The 27 gig hard drive is basically for
> storing daily backups (Up to 2 weeks worth).
> 
> Is there a way to tell zip to treat all shortcuts (links) as only links,
> not as files and directories?
> 
> Example, when I go to zip a directory that has multiple links it adds
> all the directories and files under the links as well.  This makes for a
> rather large zip file since I can have 10-20 copies of directories and
> files because of all the links I have.  I basically want to make mirror
> copy of a directory structure in a zip file.  That way I can restore it
> in a directory on my 27 gig hard drive and move the necessary
> directories, sub directories, files, and links to the 4 gig hard drive
> (thus restoring what was messed up or lost).
> 
> When I am done, I will have a zip file for each directory on the root
> level.  That way I only would have to restore what I need.  I need to be
> able to restore all the links as links, not as actual files and
> directories.
> 
> If this is not possible with ZIP, could you possibly suggest a good free
> utility that I can use to accomplish this.  I just want to use zip since
> I can also open the file on a windows based machine upon need and also
> for the space savings.
> 
> Thanks in advance
> Mike

Don't know about zip, but you can do this with tar and tell it to
compress so you get a smaller archive (you hope) than the actual data.

Something like:

cd /27gig/week1backupdir
tar --same-owner -czvpf week1.gz /whateverdir /anotherdir /etc

Check out info tar.  I don't remember if man tar has all the switches
and what they do.  I believe p is the switch you want, but check the
docs.

Reply via email to