Dear all,
I am writing a script to backup a big quantity of directories from one laptop to a server.
In a script on the server, I have a loop in bash like this:
for SRC_DIR in "$LIST_OF_DIR_TO_BACKUP" ; do
rsync -av user@laptop:/home/user/$SRC_DIR /home/user/backup
done
As I said I have a lot of directories and they change often.
2 questions :
1) I wonder if in the loop I should wait that the sync of one directory is completed before starting the sync of the next directory?
2) if yes, how should that be done?
Many thanks for your help and kind regards,