From: Rohan C. <se...@ro...> - 2004-06-01 13:21:31
|
I have been examining how flexbackup attempts to attach a title to zip archives. (I'm talking about zip, not gzip). Flexbackup relies on the -@ switch to supply a list of files to zip. From the zip man page: > -@ Take the list of input files from standard > input. Only one filename per line. This rules out being able to use -z. > -z Prompt for a multi-line comment for the > entire zip archive. The comment is ended by > a line containing just a period, or an end > of file condition (^D on UNIX, ^Z on MSDOS, > OS/2, and VAX/VMS). The comment can be > taken from a file: > > zip -z foo < foowhat To work around this, flexbackup creates an empty file using "touch". From the backup_zip() sub in the flexbackup source: > # Kludge a title by replacing / with - in the title > # then touch a file in the dir we are going to back up. > $title =~ s%/%-%g; > $title =~ s% %_%g; > $cmd = "$main::path{touch} \"$dir/$title\""; > push(@cmds, &maybe_remote_cmd($cmd, $remote)); This is a bad solution for two reasons: 1. It requires write access to the volume being backed up. 2. Some filesystems don't allow filenames to contain colons. (Windows filesystems shared over SMB is one example). Could you please modify flexbackup to apply titles by simply running "zip" again with the "-z" option after it's done the compression. BTW, thanks for your fine program. __ Rohan Carly |