Here i have a need to auto backup my directories from development machine
to my own machine in a seperate backup partition.
So i have a script to do
* Backup & move the tgz using RSA public key authentication
* Mount backup partition
* Do file copy and umount
If i run the script it works fine as it is expected to. It moves the
backup & mounts the partition and does file copy and everything without
any manual intervention.
To automate this process i prefer crond and put my script in crond. Here
it reports 'standard in must be a tty' while mounting the partition. But
everything prior (backup & move) goes fine.
How do i rectify this problem? I went on hunting for details over the net,
but didnt get any clue. Hope to get it here or atleast some links?
For your reference here is the sequence of commands been executed in my
$ ssh my_user@my_host tar -zcf mytar.tgz my_dirs
$ scp my_user@my_host:mytar.tgz /tmp/
$ su root -c "mount -t ext2 -v /dev/hda6 /mnt/part6; sleep 3; mv mytar.tgz
my_partion_dir -v; umount -v /mnt/part6"
I suppose the problem is while doing su. But i am unable to narrow down
the same. Hope to get some lights.