Disk management: Difference between revisions
→Mirror a folder: add param legend |
|||
Line 14: | Line 14: | ||
Explanation of parameters used: | Explanation of parameters used: | ||
-a: archive - preserve permissions, ownership, and timestamps | * -a: archive - preserve permissions, ownership, and timestamps | ||
-v: verbose | * -v: verbose | ||
-z: compress | * -z: compress | ||
<syntaxhighlight lang="bash" highlight="1"> | <syntaxhighlight lang="bash" highlight="1"> |
Revision as of 13:11, 26 August 2016
List all disks and partitions
- Last tested on Ubuntu 14.04.2 LTS (trusty)
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda1 ext3 38G /
sda2 swap 2G [SWAP]
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
$ rsync -azv /folder_a/ /folder_b/
This one is between different servers.
$ rsync -azv ~/folder_a/ mhan@tom.myserver.com:~/folder_b/