Professional Documents
Culture Documents
Page 1
Cron job :
make a shell script as below and save it as filescopy.sh:
#!/bin/sh
backup_dir="/home/oracle/ backup"
cd $backup_dir
scp -i ~/.ssh/id_rsa oracle@source_server_hostname:/home/oracle/backup/*.* .
Now run the cron job on the destination server with above script
$crontab -e
Enter the below line
*/2 * * * * /u01/filescopy.sh > /u01/backup.log 2>&1
save and exit
It will copy the files into the destination server for every 2 sec.
Page 2