Disk management: Difference between revisions

→‎Mirror a folder: add descriptive texts and an example for copying between different servers
add Mirror a folder
→‎Mirror a folder: add descriptive texts and an example for copying between different servers
Line 10: Line 10:
== Mirror a folder ==
== Mirror a folder ==
* ''Last tested on Ubuntu 16.04 LTS (xenial)''
* ''Last tested on Ubuntu 16.04 LTS (xenial)''
This also works between servers. The first one is on the same server.
<syntaxhighlight lang="bash" highlight="1">
<syntaxhighlight lang="bash" highlight="1">
$ rsync -azv /folder_a/ /folder_b/
$ 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>
</syntaxhighlight>


[[Category:System administration]]
[[Category:System administration]]