diff options
| -rw-r--r-- | FS/FS/Cron/backup.pm | 1 | ||||
| -rw-r--r-- | bin/freeside-backup | 42 | 
2 files changed, 43 insertions, 0 deletions
diff --git a/FS/FS/Cron/backup.pm b/FS/FS/Cron/backup.pm index 2b16e953a..63f22f737 100644 --- a/FS/FS/Cron/backup.pm +++ b/FS/FS/Cron/backup.pm @@ -3,6 +3,7 @@ package FS::Cron::backup;  use strict;  use vars qw( @ISA @EXPORT_OK );  use Exporter; +use Date::Format;  use FS::UID qw(driver_name datasrc);  @ISA = qw( Exporter ); diff --git a/bin/freeside-backup b/bin/freeside-backup new file mode 100644 index 000000000..97a4899e6 --- /dev/null +++ b/bin/freeside-backup @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w + +use strict; +use Getopt::Std; +use FS::UID qw(adminsuidsetup); +use FS::Conf; + +my $user = shift or die &usage; +adminsuidsetup $user; + +#you can skip this just by not having the config +use FS::Cron::backup qw(backup_scp); +backup_scp(); + +sub usage { +  die "Usage:\n\n  freeside-backup user\n"; +} + +### +# documentation +### + +=head1 NAME + +freeside-backup - Runs a backup + +=head1 SYNOPSIS + +  freeside-backup user + +=head1 DESCRIPTION + +Runs a backup.  See the dump-scpdest configuration option. + +=head1 BUGS + +=head1 SEE ALSO + +=cut + +1; +  | 
