This script is pulling files from username@hostname:/*
to /
on the current server.
So you need to ssh to the target server and and run it.
Tested when migrating between two DigitalOcean droplets a while ago.
Last active
December 5, 2023 17:11
-
-
Save sibsfinx/dde1877ab60c185882cd to your computer and use it in GitHub Desktop.
clone ubuntu server with rsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rsync -aAXvP --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/etc/sysconfig/network-scripts/*","/etc/network/interfaces"} username@hostname:/* / |
What's the source and what's the destination here? Does this pull or push data?
It's pulling data. Source is first arg, destination is second.
Sorry for not replying for so long, and thank you @sergeypal for the comment. I've updated the gist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the source and what's the destination here? Does this pull or push data?