How do i run it manually? also can u explain some of the syntax used in this script? im more of a java man so some of the syntax is a bit alien to me. i understand its doing some loop that syncs from what place to another? what does the --delete mean? that it deletes files from one of the destinations?
edit: i have not tried tour above script but the script i originaly wrote, produces this error when i run it:
Code:
/etc/backupPictures.sh
rsync: link_stat "/windows/mediahdd1/backupTest/sync" failed: No such file or directory (2)
rsync: ERROR: cannot stat destination "/windows/NetworkDirectories/MSHOME/I7-PC/Pictures/*/": Transport endpoint is not connected (107)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(573) [Receiver=3.0.7]
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
edit, i even tried the above script you just posted and got this error:
Code:
rsync: change_dir "/windows/NetworkDirectories/MSHOME/I7-PC/Pictures/*/Pictures" failed: Transport endpoint is not connected (107)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
script looks like this
Code:
#!/bin/bash
for i in /windows/NetworkDirectories/MSHOME/JONATHAN-I7-PC/Pictures/*; do
rsync -a --delete ${i}/Pictures/ /windows/mediahdd1/backupTest/sync/
done