Jochen Barth - 2014-07-10

How to execute & requirements

  • requires cygwin with perl "option"
  • run cygwin console with "right mouse click" -> "run as Administrator"
  • copy winpoolbackup to your cygwin-home-directory "cp /cygdrive/c/Users/xxx/Downloads/winpoolbackup.pl ."
  • create file backup-drive.txt on your backup drive (e.g. on the root directory of your drive -> "right mouse click" -> New -> Text file)
  • enter "perl winpoolbackup.pl" -- no commandline parameters required

Advantages

  • Every distinct file content is stored only once on backup drive
  • Filename nor PC nor drive nor directory does not matter, just the content.
  • Backups everything except system and programs; you do not have to think about which directories to backup.
  • Fast backup "algorithm".
  • You could keep the complete backup history without waste of backup space
  • Recovery is simple: every file is directly accessible on the backup drive
  • Encourages you to keep a lot of copies of all essential stuff on any pc drive, will not waste backup drive space any more.

Limitations

  • for use with Windows only (adaption to *nix would not be a large effort)
  • X:\Windows and X:\Program Files* will not be backup'd. This is not a system backup tool.
  • NTFS formatted backup drive required
  • NTFS allows only 1023 links per file. This is not very much for content-identical files occuring often. So zero-sized files are not hard-linked, but created instead.
  • because using cygwin, no Windows/NTFS "attributes" are going to be transferred - like file permissions, ownership, encryption, compression. Just content and modification time. That's all.
  • be careful not to modify files on the backup drive, since every "copy" (there is no copy, just hard links) is being modified then.

Toughts

  • Users of winpoolbackup.pl could enable (transparent) NTFS compression on the backup drive.

TODO's

  • cleanup script for pool directory, removing any pool file not being linked from any HOSTNAME-YYYY-MM-DD--...-directory
  • does not build checksum during copying. Files could change during being copyied. But this is almost always problematic.
  • Escape filenames containing '\n'. Backup is not affected, just sha256.cache and poolfiles-firstname.txt
  • sha256.cache should not contain checksums from files that do not exist anymore (because filesize & memory).

Details

  • Each HOSTNAME-YYYY-MM-DD--...-directory contains a backup-finished.txt - file to indicate sucessful completion
  • To get a chance to find out the original filename of any of the pool-files, there is a Y:\poolfiles-firstname.txt
 

Last edit: Jochen Barth 2014-07-13