My apologies for the silly/simple question - yet after searching the web and SE, I cannot find an answer for this specific issue.
Question:
How does one change the owner and group (system-wide) only for files owned by a specific owner?
Use-case:
We have a number of RasPis running as various servers and use rsync to back them up. When we're unfortunate enough to have to perform a restore, the owner and group of all 'user' files is pi:pi, rather than the original owner adminuser:adminuser, for example.
Without hunting the files owned by pi, is where a way to accomplish the owner/group reassignment?
Edit: This is the rsync command:
sudo rsync -azh -e 'ssh -pNNNN' --stats --delete --exclude-from="${exc_path}" "${src_path}" "${dst_addr}:${dst_path}"