The script below fails with the following error messages:
gzip: invalid option -- 'w'
Try `gzip --help' for more information.
mysqldump: Got errno 32 on write
cp: invalid option -- 'w'
Try `cp --help' for more information.
rm: invalid option -- 'w'
Try `rm --help' for more information.
Here's the script:
#!/bin/bash
nice -n 19 mysqldump --user=root --password=0@9fI6qukyBY --all-databases -c | nice -n 19 gzip -9 > /home/tech/'date +%Y%m%d' -wikibackup.tar.gz
cp /home/tech/'date +%Y%m%d' -wikibackup.tar.gz /mnt/dathomir
rm /home/tech/'date +%Y%m%d' -wikibackup.tar.gz
I thought that would be a common enough error message that I could quickly google an answer but I have had no luck. I appreciate any insight. Thanks!