Hi,
I'm currently trying to setup nightly automatic backups and updates for my system.
I have all my commands run on a script and I tie that into a crontab task.
The script is as follows
And so the output I get in my inbox is
So in this case, can I assume that using a script would not work for this task?
I would greatly appreciate your help on this matter.
Thanks in advance,
Michael L.
I'm currently trying to setup nightly automatic backups and updates for my system.
I have all my commands run on a script and I tie that into a crontab task.
The script is as follows
Code:
#for updating packages
service plexmediaserver stop
service syncthing stop
pkg update -fq
pkg upgrade -fqy
pkg upgrade -fqy py27-dateutil
pkg upgrade -fqy py27-magic
pkg upgrade -fqy gnupg
pkg upgrade -fqy py27-s3cmd
pkg upgrade -fqy multimedia/plexmediaserver
pkg upgrade -fqy syncthing
service syncthing start
service plexmediaserver start
#for backing up my files to amazon S3
s3cmd="sh /s3/upload2.sh"
timestamp="$(date +"%m-%d-%Y_%H:%M")"
#upload2.sh includes the commands to start upload
touch /var/log/s3/s3upload.$timestamp.log
screen -dmS s3sync ${s3cmd} >> /var/log/s3/s3upload.$timestamp.log
#which initiates a screen session to initiate backup... though, I don't think it properly outputs to the file I specified.
And so the output I get in my inbox is
Code:
/updapps/update.sh: service: not found
/updapps/update.sh: service: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: pkg: not found
/updapps/update.sh: service: not found
/updapps/update.sh: service: not found
/s3cd/s3upload.sh: screen: not found
So in this case, can I assume that using a script would not work for this task?
I would greatly appreciate your help on this matter.
Thanks in advance,
Michael L.