Thank you so much for your slightly creative script and the complete rsync command, which are the very things I’m looking for, @stgraber. By the way, let me improve a little bit what you’ve created here (Take the .vim folder as an example):
- Install rsync for your LXC container instance, or there’ll appear a “remote command not found” error;
-
chmod u+x ./fake-ssh(Make file fake-ssh executable); - Run the rsync command whether or not your destination folder exists:
rsync -avPz ./.vim/ -e ./fake-ssh myconainter:/tmp/.vim/ - Another option - the default style of Grsync:
rsync -r -t --progress -s ./.vim/ -e ./fake-ssh myconainter:/tmp/.vim/
Please keep an eye on the trailing file separator “/” in both the source and the destination folders as rsync is sensitive to it. Without it, a redundant folder might be created in the destination folder.