Você também pode usar rsync
.
sudo rsync -a /home/my_home/ /media/backup/my_home/
Na% man_de% manpage:
-a, --archive
This is equivalent to -rlptgoD. It is a quick way of saying you want
recursion and want to preserve almost everything (with -H being a notable
omission). The only exception to the above equivalence is when
--files-from is specified, in which case -r is not implied.
Note that -a does not preserve hardlinks, because finding multiply-linked
files is expensive. You must separately specify -H.
Veja esta pergunta para uma comparação entre rsync
e cp
: link
Observe as barras à direita (consulte a página de manual para obter detalhes).