- CheckMates
- :
- Products
- :
- General Topics
- :
- Bash script to backup SmartEvent R80.10 doesn't wo...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bash script to backup SmartEvent R80.10 doesn't work
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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/*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Referring the first article I've found: did you check "your write permission to the directory from which you are executing the command"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
