Notices


Reply
Thread Tools
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#11
rsync uses ssh by default.

I found this post. Points made there:
  • Shows how to use rsync for bi-directional syncing. Actually an example in shown in rsync manual for this too, in Examples section.
  • Explains Unison is CLI only or GTK1 (ugly...).
  • Suggests dsync.

Windows can also run SSH server. You could also simply run rsyncd on remote host.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 66 | Thanked: 11 times | Joined on Feb 2009
#12
Awesome. I'm using an OS X desktop, by the way, but could use Windows if I have to.

I just managed to use the commandline to sync from a folder on my desktop to my tablet over ssh!. I used this string, found elsewhere:
rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/

This should work just fine, as long as I can get the password to be automated. I know there's a way to share a key between the two machines, but is there a way to add my password to the string?

Edit: I also want to apologize. It looks like I asked almost this exact question early in the year. I certainly feel like a chump for asking again, and not finding that thread in my searches. I promise I searched (both google and site search) before asking again. It looks like an answer might come out of this, so at least it was worth bringing up again.

Last edited by ctennenh; 2009-11-01 at 23:50.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#13
Originally Posted by ctennenh View Post
Awesome. I'm using an OS X desktop, by the way, but could use Windows if I have to.
That is cool because OS X also can run SSH server.

I just managed to use the commandline to sync from a folder on my desktop to my tablet over ssh!. I used this string, found elsewhere:
rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/
You don't need -e ssh. It is default.

The format is:

rsync -flags SOURCE TARGET

e.g.

rsync -auv user@host:/source/dir /target/dir # copies from target host to local host
rsync -auv /source/dir user@host:/target/dir # copies from local host to target host

Also I recommend -u flag. Update. This way if file on target is newer its skipped.

Other name for 'source' is 'sender'.
Other names for 'target' are 'receiver' and 'destination'.

This should work just fine, as long as I can get the password to be automated. I know there's a way to share a key between the two machines, but is there a way to add my password to the string?
You can use password-less account. But that is really stupid. Use SSH keys instead. See http://wiki.maemo.org/SSH
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!

Last edited by allnameswereout; 2009-11-02 at 00:05.
 
Posts: 66 | Thanked: 11 times | Joined on Feb 2009
#14
Sorry, but I'm having trouble setting up the SSH keys. I followed the instructions you linked to, and the scp went through just fine. I'm still being asked for my password. I even tried switching the roles of the machines (desktop <-> tablet) and still no dice. I've also tried replacing authorized_keys2 with authorized_keys. Don't know what I'm doing wrong.

Last edited by ctennenh; 2009-11-02 at 01:48.
 
www.rzr.online.fr's Avatar
Posts: 1,348 | Thanked: 1,863 times | Joined on Jan 2009 @ fr/35/rennes
#15
Originally Posted by matikjn View Post
Some people like to use version control (e.g. svn, git) for backup and presumably you could use it for sync as well. .
I used to use git to manage my conf files, but it seems no one built git for maemo yet ?
__________________
Current obsession:

https://purl.org/rzr/abandonware

Please help to list all maemo existing apps :

https://github.com/abandonware/aband...ment-578143760

https://wiki.maemo.org/Apps#

I am looking for " 4 inch TFT LCD display screen " for Nokia n950 HandSet

http://rzr.online.fr/q/lcd


Also, I need online storage to archive files :

http://db.tt/gn5Qffd6#

https://my.pcloud.com/#page=register...e=g8ikZmcfEJy#
 
Posts: 66 | Thanked: 11 times | Joined on Feb 2009
#16
I got a friend to help me set up a pair of keys. We set them up using my server (OS X) and copied the private key over. Apparently the permissions are the tricky part.

Here's my command:
rsync -au --delete username@server:/users/username/Dropbox /media/mmc1/Dropbox/

Of course, I had to create a Dropbox folder on my removable card and make sure there was enough room in the first place. I didn't mess with the -v flag since I'm hoping to do this in the background and don't need regular feedback (-v is for verbose), but I may add it back if I run into trouble. I added --delete to remove from the n810 anything that I've deleted from my Dropbox. I just installed WiFi Connection Manager on the n810, and plan to set it up to run that command whenever I join either my home or work network, since I'd like changes I make at one location to sync when I get to the other.

Thanks everyone for your help. I effectively have Dropbox on my internet tablet now!
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#17
Originally Posted by ctennenh View Post
I got a friend to help me set up a pair of keys. We set them up using my server (OS X) and copied the private key over. Apparently the permissions are the tricky part.
man ssh-keygen
man ssh-copy-id

It is really straightforward...

Here's my command:
rsync -au --delete username@server:/users/username/Dropbox /media/mmc1/Dropbox/
--delete is for bi-directional (2-way) syncing indeed. -v is useful to log what is happening or has happened.

I'd use -v for sure. Log the output to a file. If interested can use tail -f /path/to/log for live logging. Else, you have a trace for later. IOW, its meant to analyze before or during trouble... not afterwards 'considering it'. Else, you can log on the other side.

You need to be also sure there are not 2 of these commands running. See this example for a script.

Interestingly, he also digs a bit into rsyncd.conf which is useful too. For example, you can define directories with this. E.g. {local_dir} which is then a variable defined in rsyncd.conf. Saves typing and complexity.

There is also one problem with -u flag. If a file is modified on both machines the most recent version wins. Unison would give you a warning then. I'd want user interaction, and else don't do anything.

Furthermore, this guy posts a warning for rsync & bi-directional support. Maybe worth evaluating.

The -P flag is interesting too. It allows for resuming. Useful with large files.

Anyone used GIT for this purpose?
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 66 | Thanked: 11 times | Joined on Feb 2009
#18
man ssh-keygen
man ssh-copy-id

It is really straightforward...


Thanks. I tried this, among other things, and just couldn't get it to work. Maybe it was something I had screwed up in the past. I like your idea for logging the verbose output to a file, though, so I might do that.

I don't care too much about bi-directional sync, since I don't expect to change things on the tablet, just read them. That link might be useful to others reading this thread, however.

I'm running into a couple issues here, though.

First is an error:
"rsync error: some files could not be transferred (code 23) at main.c(1385) [generator=2. 6.9]"
It doesn't look like anything is missing from the synced folders, and google tells me that code can mean all sorts of innocuous things, so I don't mind it. Just thought it was worth mentioning.

Secondly, even with the flags as set up as above -v is spitting out filenames. Is rsync just telling me what files are being checked, or is it recopying everything that's already been copied (which it shouldn't with the -u flag)? The entire action takes only a couple minutes for 1.5 GB, so I'm guessing it's the former.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#19
Originally Posted by ctennenh View Post
I don't care too much about bi-directional sync, since I don't expect to change things on the tablet, just read them.
Remount read-only just to be sure

-c is yet another flag, it uses checksum instead of mtime or size. Uses more resources though.

-b is useful in bi-directional situations. Then it won't overwrite files, it will back them up instead.

There are also interesting flags for --delete mentioned, --delete-* see the manpage.

First is an error:
"rsync error: some files could not be transferred (code 23) at main.c(1385) [generator=2. 6.9]"
It doesn't look like anything is missing from the synced folders, and google tells me that code can mean all sorts of innocuous things, so I don't mind it. Just thought it was worth mentioning.
Use -v without Googling I'd assume this could mean permission problem or bad blocks or locked file. Also note your rsync version is 3 years old.

Secondly, even with the flags as set up as above -v is spitting out filenames. Is rsync just telling me what files are being checked, or is it recopying everything that's already been copied (which it shouldn't with the -u flag)? The entire action takes only a couple minutes for 1.5 GB, so I'm guessing it's the former.
-v increases verbosity. Without it, it does not mean no output will happen. You can use > or >> to direct the output only echoing errors. Or use -q to suppress output further than default.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 12 | Thanked: 6 times | Joined on Oct 2009
#20
Login to your dropbox account and vote for Maemo client.

https://www.dropbox.com/votebox > Mobile

You can give max 6 votes.
 

The Following 4 Users Say Thank You to need-advice For This Useful Post:
Reply

Tags
dropbox, rsync, sync


 
Forum Jump


All times are GMT. The time now is 12:09.