When images on the remote server need to be backed up, we can use the scp command of Linux to remotely copy images to the local device.
Let's briefly introduce the usage of scp:
Syntax format: scp [OPTIONS] file_source file_target
OPTIONS:
-V is the same as-v in most linux commands. It is used to display the progress. It can be used to view the connection, authentication, or configuration error.
-C enable compression options
-P: Select the port. Note that-p has been used by rcp.
-R recursion of all objects below
Example:
Copy the local/home/test. log file to the remote/home/root directory
Scp/home/test. log root@121.199.25.174:/home/root (this will let the input remote server password, start copying ...)
Copy from the remote/home/root/test. log directory to the local/home directory
Scp root@121.199.25.174:/home/root/test. log/home (this will let the input remote server password, start copying ...)