|
-
August 12th, 2009, 01:06 PM
#1
mysqldump | gzip > not working
In my code:
Code:
$command = 'C:\xampp\mysql\bin\mysqldump --host='.$host.' --user='.$user.' --password='.$pass.' --all-databases | gzip > databasebackup.sql.gz';
system($command);
does not work. It creates the file databasebackup.sql.gz but when I try to open it I get "Invalid archive directory"
If I leave just $command = 'C:\xampp\mysql\bin\mysqldump --host='.$host.' --user='.$user.' --password='.$pass.' --all-databases > databasebackup.sql'; it works.
It creates the file databasebackup.sql and I can open it without a problem.
Any ideas what is wrong?
-
August 12th, 2009, 02:31 PM
#2
Re: mysqldump | gzip > not working
Since you're using XAMPP, that means you don't have Linux and that you cannot use gzip from the command line like that.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|