I'm trying to use RSYNC to restore a backup. I am trying to restore all files by running the same command that the script runs to backup but with the destination and target switched around.
rsync -rltpqz --delete [email protected]:dir /users/home/username/
However I get this error...
/users/home/username/: is a directory
You have to remain cognizant of the directory structures that you're working with. Rsync is not terribly consistent in how this is handled. Been bit a few times by this myself.
If you were backing up the directory named "username" to remotehost's /dir/ directory, you're going to want that directory with the slash from remotehost to go to /users/home on the local server.
rsync -avP [email protected]:dir/username /users/home/