As an example I found on net:
a simple backup script would be:
#!/bin/bash
OF=/var/my-backup-$(date +%Y%m%d).tgz
tar -cZf $OF /home/me/
So try to change your command to:
tar -cZf /var/log/apache2/logfile_backups/dBackup_$(date +%Y%m%d).tgz.gz /var/log/apache2/ --exclude=/var/log/apache2/logfile_backups --exclude='*.sh'
1) What distros are you using?
2) Are you running the command and script exactly at one server or not?
3) Try chmod +x script.sh
and then invoke it by saying ./scipt.sh
4) Specify tar version by saying tar --version
You said:
I think, a bash script is the same as a SSH-console like Putty.
Be sure that they are the same as each other but working with terminal over Linux is much easier