- Following will copy all of dot
~/.
files and directories (including its contents) directly underneath home directory. - To avoid copying cache and other local configs, e.g., that of web browser, java apps, etc., preferably query directory size tool under entire home
$HOME/
, usingncdu $HOME
of similar tool. - Exclude all those large directories using
rsync --exclude=.local --exclude=.cache
format - Avoid rsync password, ssh keys, .bash_history, etc. if you are uploading to github, etc.
- rsync home dotfiles and configs as follows:
# in your local machine
mkdir -p ~/server_dotfiles
# let's say your server name is tomtom, then execute rsync command as follows from your local machine. You can add/remove dot files and/or directories you like to exclude using --exclude option
rsync -avhP --exclude=".aspera" --exclude=".autojump" --exclude=".history" --exclude=".linuxbrew" --exclude=".vim_runtime" --exclude=".cpanm" --exclude=".mcrCache8.3" --exclude=".git" --exclude=".bash_history" --exclude=".bash_logout" --exclude=".cache" --exclude=".continuum" --exclude=".gem" --exclude=".gnome2" --exclude=".local" --exclude=".mozilla" --exclude=".myconfigs" --exclude=".oracle_jre_usage" --exclude=".parallel" --exclude=".pki" --exclude=".rbenv" --exclude=".Rhistory" --exclude=".rstudio" --exclude=".ssh" --exclude=".subversion" railab:.[^.]* ~/git_repos/railab_shark_dot_files/
END