Hello guys, I need to create a daily backup for files and save them on another server
I use

rsync -av --progress --inplace --rsh='ssh -p22' /var/www/html/product root@37.101.11.144:/var/www/html/backup/

but this ask me for password , I want to create a cron job to copy files automatically at midnight.
how can I baypass the password ?

Recommended Answers

All 3 Replies

Just a direction here. instead of password, there might be some setting to use public key and private key by which the authorization works. try to setup that. Caution: these keys will have an expiry date I guess. if it is the case, then periodically you need to change these keys for the process to work.

@CimmerianX
its exactly what I want :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.