By jouo
I’ve been using GitHub to move files between my droplet and my computer, which works fine.
But I was wondering if there’s a way through command line to move files from the droplet to my local machine.
Thank you
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!
Accepted Answer
Hi @jouo,
You can use either rsync or scp to move files from one place to another.
Let’s use scp for this example as it’s simpler(in this case). You’ll need to use it like so
scp root@YourDropletIp:/path/to/your/file/file.txt /local/path/where/it/should/be/saved
If you have any custom SSH port on your droplet, you can use it like so
scp -P 2222 root@YourDropletIp:/path/to/your/file/file.txt /local/path/where/it/should/be/saved
And if you wish to copy files recursively, you can do it by executing the command as
scp -r root@YourDropletIp:/path/to/your/file/file.txt /local/path/where/it/should/be/saved
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.