22 lines
774 B
Markdown
22 lines
774 B
Markdown
# Rsync
|
|
|
|
### [Backup av hel disk](https://wiki.archlinux.org/title/Rsync#Full_system_backup "Full system backup")
|
|
|
|
<pre><code>rsync -avHAWXS --info=progress2 / rsync://username@192.168.0.5/Share/path --exclude='/var/log/*'</code></pre>
|
|
|
|
* a: archive, archive mode
|
|
* v: verbose, increase verbosity
|
|
* x: one-file-system, don't cross filesystem boundaries
|
|
* H: hard-links, preserve hard links
|
|
* A: acls, preserve ACLs
|
|
* W: whole-file, copy files whole
|
|
* X: xattrs, preserve extended attributes
|
|
* S: sparse, handle sparse files efficiently
|
|
|
|
### Kopiera mellan maskiner via SSH
|
|
|
|
Push:
|
|
<pre><code>rsync [-other options] -e 'ssh -p 22' SOURCE user@x.x.x.x:DESTINATION</code></pre>
|
|
|
|
Pull:
|
|
<pre><code>rsync [-other options] -e 'ssh -p 22' user@x.x.x.x:SOURCE DESTINATION</code></pre> |