cron is making a mess of file names...
So, I am currently writing a backup script, that will run by cron every so often (I am using 1 minute intervals for testing). When I run my script, everything works fine, the backup files are created properly. However, when cron runs the backup script, the file names are sometimes chopped or have a '?' placed in the name depending on the name. The name format follows something like this:
User-Desktop-15Jun-hourly-23-diff.tar but when cron runs this the result is: -15Jun-hourly-23-diff.tar Any advice would be appreciated. I tried searching for quite a while, but I guess I cant explain this problem to google... |
Greetingz!
Whatever defines "User-Desktop-" in your script is not being outputted properly when the script creates the archive. Try creating a TARGET_FILE variable that combines whatever uses "User-Desktop-" and whatever creates the "-15Jun-hourly-23-diff.tar" part. In order to provide a clearer example, I'll need to see your script. Be sure to put [code] before your script in your next post, and [/code] at the end. |
Alright, here's the code, it isn't compact at all...
I have another script that generates this script, and the required files. config/host contains only Code:
Chris-Desktop Code:
* * * * * bash ~/setup/backup-Chris-Desktop-06.15.2012.sh > ~/setup/backup.log Code:
|
1. if you have
Code:
#!/bin/bash Code:
# this Also, use the full path to the 'host' file eg Code:
COMPUTER=$(cat /setup/config/host) For enhanced debugging, use Code:
#this HTH |
All times are GMT -5. The time now is 10:01 PM. |