Changeset 161 for trunk/brackup-target
- Timestamp:
- 08/02/07 20:54:41 (2 years ago)
- Files:
-
- 1 modified
-
trunk/brackup-target (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/brackup-target
r158 r161 11 11 $ brackup-target [opts] <target_name> get_backups 12 12 $ brackup-target [opts] <target_name> delete_backup <backup_file> 13 $ brackup-target [opts] <target_name> gc # run garbage collector 13 $ brackup-target [opts] <target_name> prune # remove old backups 14 $ brackup-target [opts] <target_name> gc # run garbage collector 14 15 15 16 =head2 OPTIONS … … 24 25 25 26 Be verbose with status. 27 28 =item --dry-run 29 30 Do not actually execute write operations. 31 32 =item --keep-backups 33 34 To be used in combination with the I<prune> command. This overrides the 35 I<keep_backups> option specified in the configuration file. 26 36 27 37 =back … … 61 71 my $opt_help; 62 72 my $opt_verbose; 73 my $opt_keep_backups; 74 my $opt_dryrun; 63 75 usage() unless 64 76 GetOptions( … … 66 78 'dest=s' => \$destdir, 67 79 'config=s' => \$config_file, 80 'keep-backups=i' => \$opt_keep_backups, 81 'dry-run' => \$opt_dryrun, 68 82 'help' => \$opt_help, 69 83 ); … … 132 146 } 133 147 148 sub CMD_prune { 149 my $removed_count = $target->prune( keep_backups => $opt_keep_backups, 150 dryrun => $opt_dryrun); 151 debug("$removed_count backups removed from target"); 152 } 153 154 sub CMD_gc { 155 my $removed_chunks = $target->gc(dryrun => $opt_dryrun); 156 debug("$removed_chunks chunks removed from target"); 157 } 158 134 159 sub debug { 135 160 my $msg = shift;
