This might be the wrong place, but I thought I'd try here first.
I've got the following backup script on ubuntu;
Well the script works great, but when I run it, it asks for the SUDO password.
I wanted to but this in the cron.daily file so that it would run everyday.
Is there a way to make this work, by that I mean run the command "sudo ./backup" without asking for the password?
Thanks
I've got the following backup script on ubuntu;
Code:
#!/bin/sh
# remote login
LOGIN=*****
# backup server IP
BSERVER=10.210.10.109
# get today's day of the week (ie: Tuesday)
DATE=`date +%A`
# remote directory to backup to
BDIR=/OSSbackup/Cacti/$DATE
# 1st directory to backup
DIR=/etc
rsync -r -q $DIR -e ssh $LOGIN@$BSERVER:$BDIR
Well the script works great, but when I run it, it asks for the SUDO password.
I wanted to but this in the cron.daily file so that it would run everyday.
Is there a way to make this work, by that I mean run the command "sudo ./backup" without asking for the password?
Thanks