- Products
- Learn
- Local User Groups
- Partners
- More
CheckMates Fifth Birthday
Celebrate with Us!
days
hours
minutes
seconds
Join the CHECKMATES Everywhere Competition
Submit your picture to win!
Harmony Mobile 4:
New Version, New Capabilities
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
Hello,
We are trying to backup our smartEvent using the procedure explained in in sk122655. When we run the commands manually, it work but when we include them in a bash script, it doesn't work. We receive the error 'Cannot stat : No such file or directory'. I've included a screenshot of the error. I've also attached the script. Do you guys see what could be the issue ?
Thanks in advance for your help.
Regards,
Alain
Hi, I would change the script by testing each variable's value.
For example:
echo ${FOLDER1}fwlogs.tgz $FWDIR/log/*
...just before executing the
tar zcf ${FOLDER1}fwlogs.tgz $FWDIR/log/*
Hi Xavier,
Thanks again for your help. When I follow your advise and I display my variables, they show up correctly(see below) . It seems BASH is not correctly interpretating the * sign used to say "anything". Do you agree ?
Regards,
Alain
Referring the first article I've found: did you check "your write permission to the directory from which you are executing the command"?
Thanks Xavier again for your help. No, this doesn't seem to be the problem. It works when I run the commands manually from the exact location.
Regards,
Alain
I just do not really understand why you don not create a backup folder in /var/log and create all the TGZ files there?
This way you always have 1 simple place to find your backup files in the location that has the most available storage.
Dear Maarten,
Thanks a lot for your input. I see what you mean but I thought the folder was not relevant because later in the script, the files are sent to the FTP server and then deleted.
Regards,
Alain
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY