Skip to main content

scp

von lokal zu Remote:

scp -r /mnt/d/Entwicklung/Praxis\ L/network_str_53_HH_v8.1.127.unf root@pl-mini-02-fbs.nb.pl:/root/

zwischen zwei Remotes:

scp -3 -r root@10.1.1.71:/var/lib/docker/volumes/kimai2_mysql-data root@fn-02.MEINEDOMAIN.it:/mnt/fn-volume-02/docker-data/volumes/kimai_mysql-data/

> Das -3 Flag leitet den Datentransfer über dein lokales System, was hilfreich ist, wenn die beiden Hosts sich nicht direkt erreichen können.

https://docs.rackspace.com/docs/copy-files-with-scp-and-rsync 

SSH and SCP examples

Copy a file from a remote server:

~$ scp user@IP.address:/path/file_name /local/destination/path/

Copy a directory from a remote server:

~$ scp -r user@IP.address:/path/directory[/] /local/destination/path/

Copy a file to a remote server:

~$ scp /local/path/file_name user@IP.address:/destination/path/
Copy a directory to a remote server:
~$ scp -r /local/path/directory[/] user@IP.address:/destination/path/