Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#653 new -u (Update options) switch to just include file headers

open
nobody
None
5
2013-07-30
2007-08-04
budd1969
No

Backup can be made with...

\Apps\7-ZipPortable\App\7-Zip\7z -y %passwordcmd% -w%temp% -x!\Backup\ -x!\Transfer\ -ms=off -r u "%subdest%\%prefix%ref.7z" -u- -up0q0r2x2z1w2!"%subdest%\%prefix%refnew.7z" -up0q3r2x2z0w2!"%subdest%\%prefix%new.7z" "%subsource%"

...where "%prefix%refnew.7z" contains current full backup version of the archive, and

where "%prefix%new.7z" contains the changes of the archive since last backup.

The problem is that "%prefix%refnew.7z" becomes very large and is updated for each backup performed. This takes a lot of time.

Wouldn't it be great to have an option just to store the directory structure, i.e. exclude the file data?

(action 4 and 5 are new)

<action> Description
0 Ignore file (don't create item in new archive for this file)
1 Copy file (copy from old archive to new)
2 Compress (compress file from disk to new archive)
3 Create Anti-item (item that will delete file or directory during extracting). This feature is supported only in 7z format.
4. copy file header from the old archive to new one (exclude file data).
5. store the new file header from disk into the archive (exclude file data).

Discussion

  • Igor Pavlov
    Igor Pavlov
    2007-08-04

    Logged In: YES
    user_id=65083
    Originator: NO

    Maybe you are right. But it's difficult to suggest some universal way to support all possible uses. I'll think in future about these problems.

     
  • Logged In: NO

    an alternative may be an option for explicit creation of catalog files. I got this idea from the DAR archiver and I use it a lot in differential/incremental backups. First a full archive is made. Next DAR is called again to extract a catalog from this archive file. This catalog basically contains only the file headers. The good thing is that in differential backup, it can be used as a placeholder for the original archive. So after a full backup, I can write the backup to tape/DVD, remove it from the HD but keep the catalog and upon the next differential, I use the catalog as a reference.

    Possibly catalog creation could be a switch used with the list command?

    I think that together with all the already present switches and the anti-item feature, 7-zip could be a superb backup utility.

     
  • Shell
    Shell
    2013-07-30

    I think that it would be easier to implement a specific compression method rather than an update option. May I suggest the following syntax:
    7z a -m0=null arcname.7z <files>
    It seems to me that coding such a function in C/C++ will be rather easy.

    If this feature should appear in Update options, then it may be handled in the same way as the Anti-item. I don't know 7z format well, but there already is a property ID 0x0F = kEmptyFile - maybe it can be used for the purpose in question? This will also eliminate the need of introducing a new method ID.