Browse files

write pod

  • Loading branch information...
1 parent 42ab7ac commit 5c0fb548aa17aa99ca6d1abc2f5d1f2b4c90e2fe @kazuho committed Nov 26, 2009
Showing with 193 additions and 1 deletion.
  1. +34 −0 blockdiff_backup
  2. +36 −0 blockdiff_dump
  3. +36 −0 blockdiff_merge
  4. +3 −1 lib/App/Blockdiff.pm
  5. +42 −0 ssh_blockdiff_dump
  6. +42 −0 ssh_lvm_dump
View
34 blockdiff_backup
@@ -64,3 +64,37 @@ fi
echo "backup completed successfully" >&2
exit 0
+
+
+=head1 NAME
+
+blockdiff_backup - a wrapper script for taking multi-generational backups
+
+=head1 SYNOPSIS
+
+ take a lvm snapshot-based backup
+ % blockdiff_backup backup_name ssh_lvm_dump root@host /dev/pv/lv
+
+ backup a remote file
+ % blockdiff_backup backup_name ssh_blockdiff_dump root@host file
+
+
+=head1 DESCRIPTION
+
+Blockdiff_backup is a wrapper script, for taking multi-generational, incremental backups using L<ssh_lvm_dump> or L<ssh_blockdiff_dump>.
+
+=head1 SEE ALSO
+
+L<App::Blockdiff> - for general information
+
+=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
View
36 blockdiff_dump
@@ -82,3 +82,39 @@ close STDOUT
or die "failed to close stdout:$!";
exit 0;
+
+__END__
+
+=head1 NAME
+
+blockdiff_dump - block-based diff (with separate md5 file)
+
+=head1 SYNOPSIS
+
+ take full backup
+ % blockdiff_dump < file 6> backup_md5.1 > backup.1
+
+ take inrcemental backups
+ % 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
+
+Blockdiff_dump is a low-level dump script for taking block-based diffs.
+
+=head1 SEE ALSO
+
+L<App::Blockdiff> - for general information
+
+=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
View
36 blockdiff_merge
@@ -57,3 +57,39 @@ close $fh
or die "failed to close file:$fn:$!";
exit 0;
+
+__END__
+
+=head1 NAME
+
+blockdiff_merge - merge tool for block-based diff
+
+=head1 SYNOPSIS
+
+ restore full backup
+ % blockdiff_merge file < backup.1
+
+ apply inrcemental backups
+ % blockdiff_merge file < backup.2
+ % blockdiff_merge file < backup.3
+ ...
+
+=head1 DESCRIPTION
+
+Blockdiff_merge is a restoration tool for block-based diffs.
+
+=head1 SEE ALSO
+
+L<App::Blockdiff> - for general information
+
+=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
View
4 lib/App/Blockdiff.pm
@@ -31,7 +31,9 @@ App::Blockdiff - collection of scripts for block-based diff (incremental backups
=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.
+App::Blockdiff is a collection of script files for taking block-based diffs and merging them.
+It is well suited for taking periodical backups of disk images or database files.
+Previous backup data is not required when taking the next differential (incremental) backup. Only the md5 file (which is substantially smaller than the full backup) should be kept to take the next incremental (differential) backup.
=head1 SEE ALSO
View
42 ssh_blockdiff_dump
@@ -84,3 +84,45 @@ if [ -e "/dev/fd/5" ] ; then
fi
exit $EXIT_CODE
+
+=head1 NAME
+
+ssh_blockdiff_dump - runs blockdiff_dump over ssh
+
+=head1 SYNOPSIS
+
+ take full backup
+ % ssh_blockdiff_dump user@host file 6> backup_md5.1 > backup.1
+
+ take inrcemental backups
+ % ssh_blockdiff_dump user@host file 5< backup_md5.1 6> backup_md5.2 \
+ > backup.2
+ % ssh_blockdiff_dump user@host file 5< backup_md5.2 6> backup_md5.3 \
+ > backup.3
+ ...
+
+=head1 DESCRIPTION
+
+Ssh_blockdiff_dump is a wrapper script that runs L<blockdiff_dump> over ssh. There is no need to install L<blockdiff_dump> on the remote machine, necessary files will be transferred by ssh_blockdiff_dump.
+
+=head1 OPTIONS
+
+=head2 -z
+
+compress output using L<gzip>
+
+=head1 SEE ALSO
+
+L<App::Blockdiff> - for general information
+
+=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
View
42 ssh_lvm_dump
@@ -55,3 +55,45 @@ if [ "$EXIT_CODE" -eq 0 ] ; then
fi
exit $EXIT_CODE
+
+=head1 NAME
+
+ssh_lvm_dump - dumps a logical volume using LVM snapshot
+
+=head1 SYNOPSIS
+
+ take full backup
+ % ssh_lvm_dump user@host /dev/pv/lv 6> backup_md5.1 > backup.1
+
+ take inrcemental backups
+ % ssh_lvm_dump user@host /dev/pv/lv 5< backup_md5.1 6> backup_md5.2 \
+ > backup.2
+ % ssh_lvm_dump user@host /dev/pv/lv 5< backup_md5.2 6> backup_md5.3 \
+ > backup.3
+ ...
+
+=head1 DESCRIPTION
+
+Ssh_lvm_dump is a wrapper script that uses L<ssh_blockdiff_dump> to take backups of LVM logical volumes (using snapshots) of a remote machine.
+
+=head1 OPTIONS
+
+=head2 -z
+
+compress output using L<gzip>
+
+=head1 SEE ALSO
+
+L<App::Blockdiff> - for general information
+
+=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 5c0fb54

Please sign in to comment.