I'd like to setup a cron job set to go off ont he first of every month at 5am. There are two steps that I'd like to put into this cron but the FreeBSD mannual is rather limiting on information.
Steps I need to automate via cron:
1). tarball a directory
2). copy it to an alternative box without prompting for password.
Since tarballing locally and THEN scp'ing it would be to complicated for something so simple, this is what I want the cron job to do (this cron job would be on the machine that will STORE the tarball);
#ssh user@[destination] "tar cvplf - /" > /local/path/to/store/archive.tar
now ssh will prompt for a password.. and a while ago i found out how to setup the ssh.auth er whatever, which took like 2 seconds but I did not save those notes to my diary. Can someone help me out with this?
additionally, would this be a valid cron job entry for what i want:
# 5 AM on the firt of each month, reach out to the web server and store a backup locally
0 5 1 * * /usr/bin/ssh user@[destination] "tar cvplf - /" > /local/path/to/store/archive.tar
Any guidence would be wonderful. I will be sure to record these notes down in my diary file this time!