rsync: difference between –size-only and –ignore-times

There are several ways rsync compares files — the authoritative source is the rsync algorithm description: https://www.andrew.cmu.edu/course/15-749/READINGS/required/cas/tridgell96.pdf. The wikipedia article on rsync is also very good. For local files, rsync compares metadata and if it looks like it doesn’t need to copy the file because size and timestamp match between source and destination it doesn’t … Read more

rsync exclude according to .gitignore & .hgignore & svn:ignore like –filter=:C

As mentioned by luksan, you can do this with the –filter switch to rsync. I achieved this with –filter=”:- .gitignore” (there’s a space before “.gitignore”) which tells rsync to do a directory merge with .gitignore files and have them exclude per git’s rules. You may also want to add your global ignore file, if you … Read more

How to resume scp with partially copied files? [closed]

You should use rsync over ssh rsync -P -e ssh remoteuser@remotehost:/remote/path /local/path The key option is -P, which is the same as –partial –progress By default, rsync will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the –partial option tells … Read more

rsync copy over only certain types of files using include option

I think –include is used to include a subset of files that are otherwise excluded by –exclude, rather than including only those files. In other words: you have to think about include meaning don’t exclude. Try instead: rsync -zarv –include “*/” –exclude=”*” –include=”*.sh” “$from” “$to” For rsync version 3.0.6 or higher, the order needs to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)