datestamp backups
authorivan <ivan>
Sat, 23 Oct 2010 21:34:50 +0000 (21:34 +0000)
committerivan <ivan>
Sat, 23 Oct 2010 21:34:50 +0000 (21:34 +0000)
FS/FS/Cron/backup.pm
bin/freeside-backup [new file with mode: 0644]

index 2b16e95..63f22f7 100644 (file)
@@ -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 (file)
index 0000000..97a4899
--- /dev/null
@@ -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;
+