Quote:
Originally Posted by rknichols
It does refer to a path on the server, but the way you have it coded could be a problem. Your local shell is going to expand the `cat ~/backup/time2.txt` substitution and pass the result to the rsync process on the server. Whether the result of that expansion makes sense on the server is another matter. If you really wanted to get the content of a time2.txt file from the server, you would need to do it another way, either by copying that file to the local machine or by executing the cat command on the server with something like:
Code:
--link-dest=/home/geek2/files/`ssh geek2@10.1.1.1 cat backup/time2.txt`
|
Thanks for the explanation.
So if I wanted something easier - if I had a backup and then I wanted only another single differential backup, after some files changed, what would the correct command be, ignoring in this example now the command expansions?
For instance, if I'd like to backup my home directory and have another differential backup on my server under the folder /backup/home2.
Code:
rsync -av --link-dest=/backup/home /home/user server:/backup/home2
Would that suffice as a basic one-time differential backup (after the initial one)? As I understand from what you've said, --link-dest=/backup/home refers to the path on the server (or more generally, on the
destionation side).
And a second question: I'm trying to back up files from a Mac OS and the ownership of the files is different from the ones on the server (meaning that it changes the owner and the group when the files are synchronized on the server).
That does automatically mean that rsync will
not create hardlinks, but will copy the files entirely? And is there a way to avoid this without having to create an analogous user/group on my linux server? Maybe break up the -a option and omit the -p (perms)? There must be an easier way, right? I'd prefer using rsync and not some other tool that works on top of rsync, as I'd really like to understand exactly how rsync works.
[later edit]
I did get it to work on my mac without having to bother with the ownership. So it did work like that directly.
Thank you for your answer.