INDEX
########################################################### 2024-01-10 11:00 ########################################################### Luke smith... Rsync https://www.youtube.com/watch?v=iTnWIKHtOnA Rsync can partially copy files and make transfers easier If copying with rsync ssh you need rsync installed on both servers cp file newfile # standard copy method rsync file newnewfile # basic rsync copy rsync file desktop: # Copy to some other ssh server "desktop" at $HOME rsync -rv # Shows what files are transferred + size - copy recursively Can only sync relevant files if only certain files have changed rsync -urv newdir desktop: # Upload only changes to this directory rsync -uvrP --delete-after newdir desktop: # Move content example # -P tells it to send files partially (to restart on failure) and show progress # -a = archive mode - preserves permissions/metadata On my own website I can do the following: # OLD METHOD scp -r html/* SERVER:./site/ # NEW METHOD # Added to my compiler to add date stamps to files newfile=`echo ${1%.*}.html | sed 's|^\./||'` touch -d "$(echo $newfile | cut -d' ' -f1) 12:00" ./html/"$newfile" rsync -uvrtP html/* SERVER:./site/ # Unless you set the TIME to not be 00:00, timezones will mess things up