I'm using a Perl script for MySQL backup, I'd like to compress the
database dumps, the business end of the script runs like:
---
while (my @arr = $sth->fetchrow) {
print "$arr[1]\n";
system("rm $backuppath/$arr[1]-$oldyear$oldmonth$oldday.sql");
system("mysqldump --opt $arr[1] -u $DB_User --password=$DB_Password >
$backuppath/$arr[1]-$year$month$day.sql");
}
---
do I simply add like:
system("gzip $backuppath/$arr[1]-$year$month$day.sql");
(and change the 'rm' line extension?)
?
--
Voytek
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html