Issue
I was wondering if there exist some program for this or some command. Would this have to be a whole script?
Let us ignore the problem of storing a backup device ID or making it persistent, and just assume the backup folder is on the same storage device. The goal is to:
- recursively back up (copy and overwrite) EVERYTHING in a folder
- only overwrite files that changed (to save processing power and redundant actions)
Having some file is allowed (to save inode numbers or sizes or whatever helps avoid using something as intensive as diff
).
Is this request too complicated? Should it be a whole program?
Solution
Generally, rsync -a src_folder/ dest_folder
will do exactly what you want. You can use -v
to get more verbose messaging of what it is doing, and there are a huge number of other options you can use for variations and tweaking as well. See the rsync(1) man page.
Answered By - Chris Dodd Answer Checked By - David Goodson (WPSolving Volunteer)