469 sub OK { say "OK @_" } |
469 sub OK { say "OK @_" } |
470 sub ERROR { say "ERROR [@_]" } |
470 sub ERROR { say "ERROR [@_]" } |
471 |
471 |
472 =head1 NAME |
472 =head1 NAME |
473 |
473 |
474 amdumpext - the amanda dump application |
474 amdumpext - the amanda dump/restore ext2/3/4 application plugin |
475 |
475 |
476 =head1 SYNOPSIS |
476 =head1 SYNOPSIS |
477 |
477 |
478 amdumpext support [options] |
478 amdumpext support [options] |
479 amdumpext selfcheck [options] [--level <level>] --device <device> |
479 amdumpext selfcheck [options] [--level <level>] --device <device> |
480 amdumpext backup [options] [--level <level>] --device <device> |
480 amdumpext backup [options] [--level <level>] --device <device> |
481 amdumpext estimate [options] [--level <level>]... --device <device> |
481 amdumpext estimate [options] [--level <level>]... --device <device> |
482 amdumpext validate [options] |
482 amdumpext validate [options] |
483 amdumpext restore [options] |
483 amdumpext restore [options] [file system objects] |
484 |
484 |
485 =head1 DESCRIPTION |
485 =head1 DESCRIPTION |
486 |
486 |
487 The B<amdumpext> is an application plugin for amanda. It drives the |
487 The B<amdumpext> is an application plugin for amanda. It's not intended |
488 native ext2/3/4 dump/restore programs found on most Linux systems. See L<dump(8)> |
488 to be called directly by the user. |
489 and L<restore(8)> for more information on these tools. |
489 |
|
490 It drives the native ext2/3/4 dump/restore programs found on most Linux |
|
491 systems. See L<dump(8)> and L<restore(8)> for more information on these |
|
492 tools. |
|
493 |
|
494 B<NOTE>: During development it turned out that dump/restore are badly |
|
495 maintained and that there might arise conditions where you can't easily |
|
496 restore from an incremtal dump. (See bug #157 at the sourceforge dump |
|
497 project site.) The problems seem start with restore 0.4b43 and do still |
|
498 exist in 0.4b44. |
490 |
499 |
491 =head1 OPTIONS |
500 =head1 OPTIONS |
492 |
501 |
493 The commands may need some options. These options are noted per command. |
502 The commands may need some options. Unsupported options are silently |
494 Unsupported options are silently ignored. Unknown options are not |
503 ignored. Unknown options are not allowed. |
495 allowed. |
|
496 |
504 |
497 =over |
505 =over |
498 |
506 |
499 =item B<--device> I<device> |
507 =item B<--device> I<device> |
500 |
508 |
537 =over 4 |
545 =over 4 |
538 |
546 |
539 =item B<--dumpdates> I<dumpdates> |
547 =item B<--dumpdates> I<dumpdates> |
540 |
548 |
541 The location of the dumpdates file. Placeholder "${c}" is allowed and |
549 The location of the dumpdates file. Placeholder "${c}" is allowed and |
542 replaced by the name of the current config. |
550 replaced with the name of the current config. |
543 |
551 |
544 =back |
552 =back |
545 |
|
546 |
553 |
547 =head1 COMMANDS |
554 =head1 COMMANDS |
548 |
555 |
549 The B<amdumpext> supports the commands from the API description found on |
556 The B<amdumpext> supports the commands from the API description found on |
550 L<http://wiki.zmanda.com/index.php/Application_API/Operations>. |
557 L<http://wiki.zmanda.com/index.php/Application_API/Operations>. |
558 This command instructs B<amdumpext> to so some selfchecks. In an ideal |
565 This command instructs B<amdumpext> to so some selfchecks. In an ideal |
559 world it will detect any problem that might prevent a successful backup. |
566 world it will detect any problem that might prevent a successful backup. |
560 |
567 |
561 mandatory options: device, level |
568 mandatory options: device, level |
562 |
569 |
|
570 |
563 =head2 estimate |
571 =head2 estimate |
564 |
572 |
565 Create an estimate about the amount of data we may expect for the |
573 Create an estimate about the amount of data we may expect for the |
566 backup. Multi-Level estimates are supported. |
574 backup. Multi-Level estimates are supported. |
567 |
575 |
568 mandatory options: device, level, ... |
576 mandatory options: device, level, ... |
|
577 |
|
578 =head2 backup |
|
579 |
|
580 This commands creates a backup. It's send to fd 1, messages from the |
|
581 backup go to fd3, optional index data goes to fd4. |
|
582 |
|
583 mandatory options: device, level |
569 |
584 |
570 =head2 validate |
585 =head2 validate |
571 |
586 |
572 This checks if the data stream is readable and looks like a dump. |
587 This checks if the data stream is readable and looks like a dump. |
573 Actually it does not try to completly validate the stream, as B<restore> |
588 Actually it does not try to completly validate the stream, as B<restore> |
574 does not have such an option. |
589 does not have such an option. |
575 |
590 |
576 =head2 restore |
591 =head2 restore |
577 |
592 |
578 Restore from a single dump. |
593 Restore from a single dump. In addition to the common options the server |
|
594 passes a list of file system objects to be restored. The list should be |
|
595 simplified, overlapping objects should be merged into one object. |
|
596 |
|
597 Currently (Amanda 3.3.5) it seems as if the server sends F<.> as object |
|
598 name for a complete file system recovery. This triggers C<restore -rf>, |
|
599 any other object name triggers the invocation of C<restore -xf>. This |
|
600 means, real incremental recoveries are only possible on the base of the |
|
601 complete file system. |
579 |
602 |
580 =head1 TESTING |
603 =head1 TESTING |
581 |
604 |
582 The B<amdumpext> may be tested on the command line. The following output |
605 The B<amdumpext> and it's subcommands may be tested on the command line. The following output |
583 file descriptors are used: |
606 file descriptors are used: |
584 |
607 |
585 =over |
608 =over |
586 |
609 |
587 =item 1 (STDOUT) |
610 =item 1 (STDOUT) |
609 $ amdumpext backup --device /dev/sda1 --level 0 1>dump 3>messages 4>index |
632 $ amdumpext backup --device /dev/sda1 --level 0 1>dump 3>messages 4>index |
610 |
633 |
611 If you're interested in reading the messages as they appear: |
634 If you're interested in reading the messages as they appear: |
612 |
635 |
613 $ amdumpext backup --device /dev/sda1 --level 0 3>&1 1>dump 4>index |
636 $ amdumpext backup --device /dev/sda1 --level 0 3>&1 1>dump 4>index |
|
637 |
|
638 To validate the backup: |
|
639 |
|
640 $ amdumpext validate <dump |
|
641 $ echo $? |
|
642 |
|
643 And finally to check the restore process: |
|
644 |
|
645 $ amdumpext restore . <dump |
|
646 |
|
647 Or |
|
648 $ amdumpext restore dirA dirB file/C |
614 |
649 |
615 |
650 |
616 =head1 EXAMPLE |
651 =head1 EXAMPLE |
617 |
652 |
618 The C<amanda.conf> should contain something similiar to the following |
653 The C<amanda.conf> should contain something similiar to the following |
619 stanza: |
654 stanza: |
620 |
655 |
621 define application "mydump" { |
656 define application "mydump" { |
622 plugin "amdumpext" |
657 plugin "amdumpext" |
623 # optional - define some additional parameters |
658 # optional - define some additional parameters |
624 property "dumpdates" "/tmp/dumpdates.${c}" |
659 # ${c} - the name of the current config |
|
660 property "dumpdates" "/var/lib/dumpdates.${c}" |
625 } |
661 } |
626 |
662 |
627 define dumptype "dump" { |
663 define dumptype "dump" { |
628 program "APPLICATION" |
664 program "APPLICATION" |
629 application "mydump" |
665 application "mydump" |