Back up folders over the local network
by Pedroski from LinuxQuestions.org on (#5G8V1)
I need to back certain folders regularly from the new laptop to the old laptop.
Thanks to great help from LQ, I can do this easily like this:
Quote:
At the moment, I copy and paste each command and press enter in bash, rsync asks for the password on the other laptop, then does the job.
But, since this is a recurring thing, I would like to automate it in bash.
How can I automate this process?
Make a text file with the paths to the folders to backup?
Then connect with ssh? Or still use rsync??
Can I hand rsync a batch file??


Thanks to great help from LQ, I can do this easily like this:
Quote:
rsync -av -e "ssh" --progress /home/pedro/summer2021 pedro@192.168.10.13:/home/pedro/ |
But, since this is a recurring thing, I would like to automate it in bash.
How can I automate this process?
Make a text file with the paths to the folders to backup?
Then connect with ssh? Or still use rsync??
Can I hand rsync a batch file??