diff options
| author | ivan <ivan> | 2010-10-23 21:34:50 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2010-10-23 21:34:50 +0000 | 
| commit | f8f2e2063d597045cbbe16b2f7f8b973f1dde77d (patch) | |
| tree | 3c57e8de73d8bdb14a823ad9848654e6a95756ae | |
| parent | ae6899faa48a8ff39b8f915d138080e8d92f0816 (diff) | |
datestamp backups
| -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; +  | 
