PDA

View Full Version : Folder synchronisation utility



Castar
October 30th, 2006, 03:36 PM
Hi, I was wondering if anyone knows of anything similar to Allway Sync for windows? What it does is keeping folders in different locations, such as the Documents folder to the /home directory to the Documents folder in a USB stick. Allway sync is nice for windows but I would really like one for linux.

chaosgeisterchen
October 30th, 2006, 04:14 PM
I intended to write one some time ago but school won't allow me to take my time.

Castar
October 30th, 2006, 04:22 PM
Actually, it's not a bad idea to write one. And it should be relatively easy to do. Maybe I will... :-k

DoctorMO
October 30th, 2006, 04:27 PM
I have some drawings for one, the idea was to control data flow and syncing specificly for devices (mass storage/pdas etc), online hosts, cds/dvd backups and computer folders. any of which could be sync'ed and it would handle files and databases of various kinds.

nice gui too, but I'm busy right now.

stimpsonjcat
October 30th, 2006, 04:29 PM
Unison (apt-get install unison-gtk)
works like a charm. Even cross-platform!

Castar
October 30th, 2006, 04:45 PM
Thank you! I'll have a look.

TheWizzard
October 30th, 2006, 10:52 PM
Hi, I was wondering if anyone knows of anything similar to Allway Sync for windows? What it does is keeping folders in different locations, such as the Documents folder to the /home directory to the Documents folder in a USB stick. Allway sync is nice for windows but I would really like one for linux.

rsync is a command line program for synchronistaion and backups

MarnixV
November 6th, 2006, 12:59 AM
Hi, I tried Unison to sync a new file in my /home with a USB DISK. Unison said it could not set the permission of the new file on the USB DISK to rw-r--r--, and that it set the permission to rw------- instead. But when I check the USB DISK I see it has not transferred the file at all.
I don't want to change permissions for any files I want to sync, so can I get Unison to transfer the files anyway? Thanks in advance...

professor_chaos
November 6th, 2006, 01:55 AM
if your usb disk is formated as fat, then your not going to be able to preserve permissions, as all files on a fat disk have permissions of the person who mounted it. It will no nothing of groups.

MarnixV
November 6th, 2006, 10:49 AM
thanks, I thought it would have something to do with the USB being FAT. Is there anything I can do to keep it FAT, while being able to use it with Unison?

stimpsonjcat
November 7th, 2006, 10:53 PM
it should work without doing anything else. did you unmount the usb disk after sync'ing? Linux does not necessarily write changes to usb disks immediately - you have to wait a few seconds or perform an unmount/mount if you want changes to be written immediately.

there's some info about cross platform usage and permissions in the unison docs, though I don't think it's relevant to your problem: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html

MarnixV
November 8th, 2006, 12:49 AM
Thanks for your help...I have not tried to unmount the USB disk. The problem arises while unison is trying to synchronise. I can get it to work on two folders in my own home directory. I think it has something to do with permission rights on the mounted USB DISK.

My input:

$ unison /home/marnix/documents/a.tmp /media/USB\ DISK/b.tmp

Output of unison:

a.tmp b.tmp
props <-?-> props / []

I tell him to skip this props. It is not a file, and not present in the directories, not even as a hidden file/folder.
Next unison proposes the actual file synchronisation:

file ----> eerste.txt [f]

with eerste.txt being a file I put in a.tmp to try it out. It should indeed sync to folder b.tmp so I press enter. I get the following:

-------------------------------------------------------------
UNISON started propagating changes at 00:42:34 on 08 Nov 2006
[CONFLICT] Skipping
[BGN] Copying eerste.txt
from /home/marnix/documents/a.tmp
to /media/USB DISK/b.tmp
Failed: Failed to set permissions of file /media/USB DISK/b.tmp/.#eerste.txt.4676517c19e96f815b32b6061d0c853e.unis on.tmp to rw-r--r--: the permissions was set to rw------- instead
100% 00:00 ETAFailed [eerste.txt]: Failed to set permissions of file /media/USB DISK/b.tmp/.#eerste.txt.4676517c19e96f815b32b6061d0c853e.unis on.tmp to rw-r--r--: the permissions was set to rw------- instead
UNISON finished propagating changes at 00:42:34 on 08 Nov 2006


Saving synchronizer state
Synchronization incomplete (0 items transferred, 1 skipped, 1 failure)
skipped:
failed: eerste.txt
--------------------------------------------------------------

I hope this rings a bell for you. By the way, when I 'ls' /media I get the following for the USB DISK:

drwx------ 16 marnix marnix 23040 2006-11-08 00:32 USB DISK

The USB DISK gets mounted automatically when I plug it in.

Thanks anyway

stimpsonjcat
November 9th, 2006, 01:14 PM
you could try the perms=0 option (ignore all permissions, since they don't work on FAT anyway).

BTW, have you noticed the unison-gtk package? it provides a gtk user interface for unison.

xpan
February 4th, 2007, 12:18 PM
can I sync between my folder and a remote folder through samba sharing using Unison?

It seems that the only options it supports are SSH, RSH, socket.

sam81
February 4th, 2007, 03:50 PM
Have a look to grsync http://www.opbyte.it/grsync/ as well it's a very handy graphical frontend for rsync, and it's in the universe repos

mostwanted
February 4th, 2007, 04:49 PM
I always use Grync for syncing between my backup hard disk and my home folder.

xpan
February 4th, 2007, 10:48 PM
thanks for your answers, but I can't see any way for me to sync between a local and a remote folder (shared with Samba).

GrSync, asks me to type in two folders starting with a "/". How can I point to a remote folder starting with a "/"?

Can I link a local folder to a remote one? For instance /home/<user>/remote_folder, so I can use it as if it was local?

cowlip
February 4th, 2007, 11:38 PM
I think fusesmb allows you to browse SMB mounted on /

It should be default because gnomevfs sucks :)

xpan
February 5th, 2007, 09:14 PM
I think fusesmb allows you to browse SMB mounted on /

It should be default because gnomevfs sucks :)


i installed fusesmb, but I can't see how to mount a public folder in another machine.

For instance, I use a folder named "public2" on a machine at 192.168.1.15

how can I mount that folder on my (local) machine with fusesmb?

xpan
February 6th, 2007, 12:14 PM
Ok.

I managed to mount my remote folder at a local folder using fstab and smbfs.

So when I go to /mnt/pub I can browse through the remote folder contents.

However, grsync although it says that synchronization completed successfully, nothing has been transfered to the remote folder.

Unison, says something like this:

Error in setting permissions:
Operation not permitted [chmod(/mnt/pub/test/.#testfile.odt.b6ba3fde8b601cb7bdab1ecc9a20b714.un ison.tmp)]

However, I had set user read-write perimisions while mounting...

thanks!

cowlip
February 9th, 2007, 04:49 AM
hope you get some more help today! I don't know...what does your fstab look like? Can you copy files to it within Nautilus or the command line?

dekaru
December 1st, 2007, 08:37 PM
thx 4 the tip !

John_T
January 3rd, 2008, 01:54 PM
you could try the perms=0 option (ignore all permissions, since they don't work on FAT anyway).

Bingo, that did the trick for me!

I'm synchronizing data on an EXT3 Ubuntu partition and an NTFS partition on a portable hard drive shared with Windows and Linux systems when I'm out and about.

Chonnawonga
April 5th, 2008, 05:44 PM
You can add
perms = 0 to the config file, which is at
/home/username/.unison/default.prf

(Of course, you should replace "username" with your user name.)

jancelis
April 14th, 2009, 06:56 AM
Here's how I do a folder synchronisation from linux to a vfat USB stick:
unison -perms=0 -batch /home/ubuntu /media/USB

So you can add the perms option in commandline too.