backup/split_backup.pl aktualisiert

Add help opt
This commit is contained in:
hendrik 2025-07-24 18:44:00 +00:00
parent ef403883b2
commit c9070f2ed2

View File

@ -226,7 +226,7 @@ sub sync_disc {
$logger->info("Syncing disc '$disc_path' done.");
}
my $show_help;
my $res =
GetOptions(
@ -236,9 +236,31 @@ GetOptions(
'use-existing-layout!',
'only-disc:i' ,
'dry-run',
'use_effective_free_kb!' , #
'use-effective-free-kb!' , #
'no-prune!' ,
'help!' => \$show_help,
) or log_die "Error in command line arguments\n";
if ( $show_help ) {
print <<'HELP';
Usage: perl backup.pl [options]
Options:
--generate-layout-only Create backup layout file but skip actual backup
--simulate-updates Simulate updates for layout check without touching data
--use-existing-layout Use a previously generated layout plan
--only-disc=N Run backup only for disc number N (as per layout index)
--dry-run Simulate full backup process but skip data copy
--use-effective-free-kb Use precise space checking (exclude currently used space on disc)
--no-prune Disable pruning of old backups
--help Show this help message and exit
HELP
exit 0;
}
$opt = { map { $_ =~ s/-/_/gr } @{[%$opt]} } ;
$logger->info("Running with Parameter", $opt);