Unison: synchronisation and backup


Recommended Posts

Some unRAIDers may be interested in unison for their synchronisation and backup needs: http://www.cis.upenn.edu/~bcpierce/unison/

 

1) put the text-UI executable for GNU/Linux on your flash, e.g., as /boot/unison

 

2) add, e.g, the following (excluding the ..., <...>) to /boot/config/go in order to

    - backup /boot/config at start-up and

    - make it possible to synchronise to your unRAID machine

 

<go@unRAID>

...

export UNISON=/mnt/disk10/.unison

/boot/unison backup_config

/boot/unison -socket 1111 &

...

</go@unRAID>

 

2a) In the example, all administrative files for unison are stored in /mnt/disk10/.unison.

 

2b) The first unison invocation assumes that the UNISON directory contains a file called backup_config.prf, which could contain the following (excluding the <...>)

 

<backup_config.prf@unRAID>

root = /boot

root = /mnt/disk10/users/unraid

force = /boot

batch = true

 

path = config

ignore = Name *.key

 

logfile = /mnt/disk10/.unison/unison.log

 

backup = Name *

maxbackups = 10

</backup_config.prf@unRAID>

 

The effect of this is that the content of /boot/config (except for any *.key files) is synchronised to /mnt/disk10/users/unraid/config, with preference always given to the file versions in /boot/config; a log is kept in /mnt/disk10/.unison/unison.log and up to 10 old versions of the files from /boot/config are kept in /mnt/disk10/.unison/backup/config.

 

2c) The second unison invocation makes unison available as a server on port 1111. NB! no security is in place (and the method is deprecated with the preferred method being ssh-tunnelled P2P invocation). An example profile for backing-up to the unRAID server is (excluding the <...>):

 

<myprofile.prf@LocalMachine>

root = D:/

root = socket://192.168.11.150:1111//mnt/disk10/users

path = Rene

fastcheck = true

ignore = Name CVS

ignore = Name .svn

</myprofile.prf@LocalMachine>

 

The effect is that D:/Rene on the local machine is synchronised against /mnt/disk10/users/Rene on the unRAID machine at 192.168.11.150, with CVS and SVN administrative files ignored.

 

3) The on-line manual documents the full range of options that are available.

 

4) unison runs on GNU/Linux, Mac OS X, Solaris, Windows, and probably more.

Link to comment
  • 7 years later...
  • 1 year later...

Has anyone done this lately?  (this is a very old post)

I use unison to sync PC drives across several PCs on my home network, but I would like to sync one PC drive to Unraid.

I am familiar with setting up prf files, etc, but all my unison experience has been on Windows.  I am hesitant to try this without assurance it works, as I don't want to mistakely screw up my unRaid storage-

 

Thanks! 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.