About File Transfer in SCP

Asked 2 years ago, Updated 2 years ago, 96 views

I would like to transfer files to SCP from local ("Server A") to remote ("Server B") using SCP's -pr option to maintain file attributes per directory.

At this time, I would like to transfer only files that do not exist on server B, and also transfer only files whose update date and time are newer than those on server B.
Is there any good way to do this?
Also, if SCP is difficult, is there any other good way?

By the way, rsync is not available because it is not in the other server.
I would appreciate it if you could give me some advice.
Thank you for your cooperation.

scp

2022-09-30 19:27

1 Answers

It's been solved, so I'll leave it here.

This time, we installed SSHFS to mount and copy the remote server to the local server.
Incidentally, it may be a problem with this environment, but if you don't add readdir_ino when mounting with sshfs, the permission of the directory will not be maintained when copying.


2022-09-30 19:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.