Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 15 lines (10 sloc) 0.517 kb
#!/usr/bin/perl -w
$date = `date +'%F-%T'`;
chop $date;
$cmd = "/usr/local/pgsql/bin/pg_dump -U OSQA_DATABASENAME OSQA_DATABASENAME | gzip -c > ~/backup/OSQA_APPNAME/OSQA_APPNAME-database-$date.pgsql.gz";
print STDERR "$cmd\n";
system($cmd);
$cmd = "rm ~/backup/OSQA_APPNAME/OSQA_APPNAME-database-last.pgsql.gz ; ln -s ~/backup/OSQA_APPNAME/OSQA_APPNAME-database-$date.pgsql.gz ~/backup/OSQA_APPNAME/OSQA_APPNAME-database-last.pgsql.gz";
print STDERR "$cmd\n";
system("$cmd");
system("chmod -R go-rwx ~/backup");
Jump to Line
Something went wrong with that request. Please try again.