...
Backup and Syc
Most used to perform normal backup difference only mirror backup of source to destination and shows,
- Progress of copy
- Speed of copy
- Summary of bytes sent & received, total size and average transfer speed
On a desktop machines that might go to sleep using with a keep alive command,
Code Block | ||
---|---|---|
| ||
caffeinate rsync [...] # Mac OS X
? # Linux |
Backup Interactively
Here is the rsync command,
Code Block | ||
---|---|---|
| ||
rsync --recursivearchive --delete --sparse --compress --verbose --itemize-changes --human-readable --progress /home/tempadmin/tmp/source /home/tempadmin/tmp/destination |
...
destination |
--archive = which includes,
- --recursive = subdirectories
- --links = copy symbolic links as symbolic links
- --perms = preserve permissions
- --times = preserve times
- --group = preserve group
- --owner = preserve owner
- --devices = preserve device files (super-user only)
- --specials = preserve special files
--delete = delete any files not in the source
--sparse =
--verbose =
--itemize-changes =
--human-readable =
--progress =
source =
destination = destination may be a directory but the most useful is actually to another system running the rsync service
Be very careful not to include a trailing slash in source and destination(maybe slash ok here but need to test) or you will end up deleting everything in your target.
Backup to rsync Service
Instead of a directory, the destination may be another system running the rsync service. This method is extremely fast and does not have the overhead
Code Block | ||
---|---|---|
| ||
caffeinate rsync [...] # Mac OS X
? # Linux | ||
rsync --archive --delete --sparse --compress --verbose --itemize-changes --human-readable --progress /home/tempadmin/source rsync://rsyncUser@destSystem/destination |
--destination =
--compress =
Backup via Script
In order to run as a script add the following,
--password-file =
--log-file=
Straight Copy
Simple straight copy and can be used to resume (still need to modify for resume),
...