- To: slug@xxxxxxxxxxx
- Subject: [SLUG] gzip from perl script
- From: "Voytek" <lists@xxxxxxxxxx>
- Date: Thu, 22 Sep 2005 09:14:13 +1000 (EST)
- User-agent: SquirrelMail/1.5.1 [CVS]
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