Creating differential backups with 7-Zip

This is so great I'm shamelessly copying command lines for my own archive (aka this blog) - but also providing link to original.



7zip commands to create a backup of files

First step is to create full backup which is fairly easy:
7za a c:\archive.7z  c:\folder_to_archive
Next is to create differential backup with name diff1.7z
7za u c:\archive.7z  c:\folder_to_archive  -ms=off -mx=9 -t7z -u- -up0q3r2x2y2z0w2!c:\diff1.7z
  • Where command switches stand for:
  • -mx=9 - best compression
  • -t7z - 7z archive type
Wtf "-up0q3r2x2y2z0w2!c:\diff1.7z" is ?
Actions mask to determinite 7z behavior
p - File exists in archive, but is not matched with wildcard.
q - File exists in archive, but doesn't exist on disk.
r - File doesn't exist in archive, but exists on disk.
x - File in archive is newer than the file on disk.
y - File in archive is older than the file on disk.
z - File in archive is same as the file on disk
w - Can not be detected what file is newer (times are the same, sizes are different)
Number means action:
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

Comments

  1. Yes, I did all like in your instructions, but something was wrong again. I don't know, maybe there is some mistake or something. I found the article where is described how to open rar file https://wikiext.com/rar , so I began to follow the instructions and I did it. Maybe for someone this information will be useful.

    ReplyDelete

Post a Comment

Got something to say?!