General Question

VoodooLogic's avatar

Can a person rsyc using SSH from a remote location to a file server?

Asked by VoodooLogic (729points) March 6th, 2009

I’m trying to backup my music to a spare machine, but all the documentation I find seems to put the command at the server end. when it succeeds it syncs in the wrong direction… When I try to flip the source and destination it fails.

For instance
rsync -vaen ssh username@192.168.1.13:/lib/var/mythtv/music/ /home/username/Music > /home/username/rsync.new.txt
works but syncs the wrong way.

rsync -vaen ssh /home/username/Music username@192.168.1.13:/lib/var/mythtv/music/ > /home/username/rsync.new.txt
however, fails.

HELP!

Observing members: 0 Composing members: 0

7 Answers

bodyhead's avatar

Are you trying to sync your local music to a remote server?

You’ve built a mythtv box, kudos. That’s not easy.

(I’m calling the machine you ssh into your local machine)

local -> file

Then you want to run rsync

then you want

remote -> file

Is that correct?

You’re on the right track with the second command. Let me look up the syntax.

VoodooLogic's avatar

I didn’t say it was working… but thanks. Turns out I can flip the source and the destinations. MY problem was /lib/var/ is actually /var/lib/ GEEZ…. the -n command produced the desired results and I’m going to run it now.. fingers crossed.

bodyhead's avatar

USAGE

You use rsync in the same way you use rcp. You must specify a source and a destination, one of which may be remote.

Perhaps the best way to explain the syntax is some examples:

rsync *.c foo:src/

this would transfer all files matching the pattern *.c from the current directory to the directory src on the machine foo. If any of the files already exist on the remote system then the rsync remote-update protocol is used to update the file by sending only the differences. See the tech report for details.

rsync -avz foo:src/bar /data/tmp

this would recursively transfer all files from the directory src/bar on the machine foo into the /data/tmp/bar directory on the local machine. The files are transferred in “archive” mode, which ensures that symbolic links, devices, attributes, permissions, ownerships etc are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer.

rsync -avz foo:src/bar/ /data/tmp

a trailing slash on the source changes this behavior to transfer all files from the directory src/bar on the machine foo into the /data/tmp/. A trailing / on a source name means “copy the contents of this directory”. Without a trailing slash it means “copy the directory”. This difference becomes particularly important when using the—delete option.

You can also use rsync in local-only mode, where both the source and destination don’t have a ’:’ in the name. In this case it behaves like an improved copy command.

rsync somehost.mydomain.com::

this would list all the anonymous rsync modules available on the host somehost.mydomain.com. (See the following section for more details.)

as found here

If you keep reading on down from there usage on the link
What distro are you building it on?

bodyhead's avatar

That makes sense. Whenever I’m working with Linux servers the first thing I check is to see if the files exist and the second thing I check is permissions for the files I’m using.

VoodooLogic's avatar

Mytbuntu – on a P.O.S. 663 mhz. It’s got a beta driver for a hauppauge 1600. Drivers install fine but then something else doesn’t work… so it’s become my file server for my modded xbox with XMBC.

The Computer is too slow for live TV but it’s supposed to be fine for recording. I guess I just need to level up my Geek skills before going back to it.

Thanks for the assist.

bodyhead's avatar

Hey I could help you if you wanted. Mythbunu is a good choice because Ubutnu is so easy ‘in comparison to the others’.

I’ve also got a modded xbox that I watch movies with. I’m sure that you’re probably trying to use your xbox as a frontend for your mythbuntu box. That’s a workable scenario. Message me if I can help you with anything. It’s possible to get that working.

VoodooLogic's avatar

great, I’ll get in contact w/ you.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther