How to copy files from one server to another droplet


I broke my website and now I am trying to spin a new droplet and copy the files from one droplet to another.

Can anyone let me know how I can do this?

Thanks a lot.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It’s pretty easy. You can use scp to transfer your files over ssh.

scp -r /path/to/my/files root@

Of course you will need to replace with your new droplet’s IP and update the paths included above. This command would copy everything in /path/to/my/files to the directory /path/on/remote/droplet on the other droplet.

scp -P 2222 -r -i /path/to/my/openSSH/key /path/to/my/files root@ you need to specify key of your remote droplet. if needed use puttygen to convert your key to OpenSSH your openSSH key should not accessible by others. example: permission 0400.


This comment has been deleted