Permalink
Browse files

start making it a CPAN module

  • Loading branch information...
1 parent c03f98f commit e8596a88aebc9d8a7bb9ab9513903725a8cb4139 @kazuho committed Nov 25, 2009
Showing with 76 additions and 57 deletions.
  1. +18 −0 Makefile.PL
  2. +0 −57 README
  3. +58 −0 lib/App/Blockdiff.pm
View
@@ -0,0 +1,18 @@
+use inc::Module::Install;
+
+name 'App-Blockdiff';
+
+all_from 'lib/App/Blockdiff.pm';
+
+configure_requires 'Module::Install::ReadmeFromPod';
+
+install_script 'blockdiff_backup';
+install_script 'blockdiff_dump';
+install_script 'blockdiff_merge';
+install_script 'ssh_blockdiff_dump';
+install_script 'ssh_lvm_dump';
+
+auto_include;
+auto_install;
+
+WriteAll;
View
57 README
@@ -1,57 +0,0 @@
-BLOCKDIFF - a differential backup tool for block devices and files
-
-
-COMPILE
-
-# gcc -Wall -g -o blockdiff_dump blockdiff_dump.c -lcrypto
-# gcc -Wall -g -o blockdiff_merge blockdiff_merge.c
-
-
-FULL BACKUP
-
-# blockdiff_dump < file_to_backup 6> backup.md5 | gzip > backup.img
-
-
-INCREMENTAL BACKUPS
-
-# blockdiff_dump < file_to_backup 5< backup.md5 6> backup.2.md5 | gzip > backup.2.img
-# blockdiff_dump < file_to_backup 5< backup.2.md5 6> backup.3.md5 | gzip > backup.3.img
-...
-
-
-REMOTE BACKUP (HIGH LEVEL, INCREMENTAL)
-
-# blockdiff_backup backup-name ssh_blockdiff_dump -z root@host file_to_backup
-# blockdiff_backup backup-name ssh_blockdiff_dump -z root@host file_to_backup
-# blockdiff_backup backup-name ssh_blockdiff_dump -z root@host file_to_backup
-...
-
-
-REMOTE BACKUP (LOW ELVEL)
-
-# ssh_blockdiff_dump -z root@host file_to_backup 6> backup.md5 > backup.img.gz
-# ssh_blockdiff_dump -z root@host file_to_backup 5< backup.md5 6> backup.2.md5 > backup.2.img.gz
-# ssh_blockdiff_dump -z root@host file_to_backup 5< backup.2.md5 6> backup.3.md5 > backup.3.img.gz
-...
-
-
-REMOTE LVM BACKUP (HIGH LEVEL, INCREMENTAL)
-
-# blockdiff_backup backup-name ssh_lvm_dump -z root@host
-# blockdiff_backup backup-name ssh_lvm_dump -z root@host
-# blockdiff_backup backup-name ssh_lvm_dump -z root@host
-...
-
-
-REMOTE LVM BACKUP (LOW LEVEL)
-
-# ssh_lvm_dump -z root@host volume_path 6> backup.md5 > backup.img.gz
-# ssh_lvm_dump -z root@host volume_path 5< backup.md5 6> backup.2.md5 > backup.2.img.gz
-# ssh_lvm_dump -z root@host volume_path 5< backup.2.md5 6> backup.3.md5 > backup.3.img.gz
-
-
-RESTORE
-
-@server# for i in `ls backup.*`; do
-> blockdiff_merge /dev/..lv_name < $i
-> done
View
@@ -0,0 +1,58 @@
+package App::Blockdiff;
+
+our $VERSION = 0.01;
+
+1;
+__END__
+
+=head1 NAME
+
+App::Blockdiff - collection of scripts for block-based diff (incremental backups) and merge
+
+=head1 SYNOPSIS
+
+ # remote file backup
+ % blockdiff_backup backup_name ssh_blockdiff_dump -z root@host remote_file
+ % blockdiff_backup backup_name ssh_blockdiff_dump -z root@host remote_file
+ ...
+
+ # remote lvm backup (snapshot)
+ % blockdiff_backup backup_name ssh_lvm_dump -z root@host remote_lv
+ % blockdiff_backup backup_name ssh_lvm_dump -z root@host remote_lv
+ ...
+
+ # low level backup (full)
+ % blockdiff_dump < file 6> backup_md5.1 > backup.1
+ # low level backup (incremental)
+ % blockdiff_dump < file 5< backup_md5.1 6> backup_md5.2 > backup.2
+ % blockdiff_dump < file 5< backup_md5.2 6> backup_md5.3 > backup.3
+ ...
+
+
+=head1 DESCRIPTION
+
+App::Blockdiff is a collection of script files for taking block-based diffs and merging them. It is well suited for taking backups of disk images and database files.
+
+=head1 SEE ALSO
+
+L<blockdiff_backup> - high level wrapper for taking backups
+
+L<ssh_blockdiff_dump> - wrapper script for running blockdiff_backup over ssh
+
+L<ssh_lvm_backup> - wrapper for taking LVM snapshot-based backups over ssh
+
+L<blockdiff_dump> - low level backup script
+
+L<blockdiff_merge> - merge script (used for restoration)
+
+=head1 AUTHOR
+
+Copyright (C) 2009 Cybozu Labs, Inc., written by Kazuho Oku
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
+
+See http://www.perl.com/perl/misc/Artistic.html
+
+=cut

0 comments on commit e8596a8

Please sign in to comment.