How the heck do you copy a directory structure from one server to the other and preserve *ALL* attributes?

Red Squirrel

No Lifer
May 24, 2003
70,199
13,585
126
www.anyf.ca
Trying everything like scp, taring etc.. Nothing is working. I want to copy a directory from one server to the other, and have everything match. Time stamps, owner, permissions, etc...

How do I go about doing that?

Basically I cloned a server to a VM, and now I want to make it live, so I just want to copy the /home folder so that everything is up to date, as the old server is still production right now so stuff changed since the clone.
 

Red Squirrel

No Lifer
May 24, 2003
70,199
13,585
126
www.anyf.ca
Nevermind, seems rsync is indeed working with the "a" option, it's just that it does not apply everything right away so while it's copying it does not appear to be working but then everything starts to update after.
 
  • Like
Reactions: Bardock

Bardock

Senior member
Mar 12, 2014
346
39
91
then use the info flag

rsync --info=progress2 -avz /source /destination

all in the man page
 
  • Like
Reactions: skyking

skyking

Lifer
Nov 21, 2001
22,709
5,837
146
thanks I'll be doing this when the corona dust settles with several gigs of files.