|
|
Line 7: |
Line 7: |
| sda2 swap 2G [SWAP] | | sda2 swap 2G [SWAP] |
| </syntaxhighlight> | | </syntaxhighlight> |
|
| |
| == Mirror a folder ==
| |
| * ''Last tested on Ubuntu 16.04 LTS (xenial)''
| |
|
| |
| This also works between servers. The first one is on the same server.
| |
|
| |
| Explanation of parameters used:
| |
| * -a: archive - preserve permissions, ownership, and timestamps
| |
| * -v: verbose
| |
| * -z: compress
| |
|
| |
| <syntaxhighlight lang="bash" highlight="1">
| |
| $ rsync -azv /folder_a/ /folder_b/
| |
| </syntaxhighlight>
| |
|
| |
| This one is between different servers.
| |
|
| |
| <syntaxhighlight lang="bash" highlight="1">
| |
| $ rsync -azv ~/folder_a/ mhan@tom.myserver.com:~/folder_b/
| |
| </syntaxhighlight>
| |
|
| |
| [[Category:System administration]]
| |