Skip to content

Instantly share code, notes, and snippets.

@leommoore
Created May 23, 2016
Embed
What would you like to do?
rsync

##rsync

If your folder contains subfolders and more importantly symlinks you want to use rsync:

rsync -aruv localfolder/ user@server:destination/

Or in reverse:

rsync -aruv user@server:destination/ localfolder/

This will do a recursive backup / copy from localfolder to your server while keeping ownership and permissions intact. The solutions suggested so far are valid however scp doesn't handle symlinks by default and will instead create a new copy of the linked file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment