Koozali.org: home of the SME Server

affa vs backup pc vs dungog rsync backup

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
affa vs backup pc vs dungog rsync backup
« on: April 10, 2018, 02:19:29 AM »
I'm finally getting around to updating my backup server to SME 9.2. The issue is I have a number of client servers that I backup and use the dungog rsync program.
Looking at affa to replace dungog, Im not seeing if it does incremental backups. It appears backup pc does.
I am also concerned if either of these options will recognize the backup files I already have and just update them if changed or replaced 
Looking over the documentation I'm just not sure which way to jump.
If you think you know whats going on, you obviously have no idea whats going on!

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: affa vs backup pc vs dungog rsync backup
« Reply #1 on: April 10, 2018, 05:22:01 AM »
You will have to decide ;)

None will be able to accept your previous backups to the best of my knowledge.
You can keep the old aside untill they are not usefull anyymore.
The issue might be the time to sync the first tim if you are off site, or the available space to backup.

Honestly I would go with backup pc if you havemultiple server backing up to one :
- it can reduce disk size when multiple backup use similar file
- the restore option for one file or multiple file with web browser are fantastic.
- the report on the web interface are clear.
- it is highly maintained
- it just works !


Affa could be great with the rise option, but only if you use a 1:1 server /backup. It is only maintained here.

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: affa vs backup pc vs dungog rsync backup
« Reply #2 on: April 11, 2018, 02:42:54 PM »
Thank you for the info.

I do have an additional question about using affa to upgrade to 9.2. Can I safely bring the opt and var folders from the 8.2 server to the 9.2? I figured it would be easier to ask rather than have ti do it twice.

Thanks
If you think you know whats going on, you obviously have no idea whats going on!

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: affa vs backup pc vs dungog rsync backup
« Reply #3 on: April 11, 2018, 07:57:46 PM »
you can, but if your issue is just to bring those two folders, just do a regular backup restore and rsync the two folder after. The advantage is to restore your sme fast, and then move the big data here that is not mandatory to get the server up and running.

Affa could be used to migrate between versions, but this is not the initial purpose and it can lead to few issues, including :
- wrong /changed uid for user or group leading to incorrect read write access for some deamons
- custom template and templates restored while the rpm of the contribs has not been installed back.

On my own I am using either backup pc and create via the cli a smeserver.tgz with all the needed folders, see the wiki page for some informaiton. Alternatively I have started using a script initially created by FWS here : https://wiki.fws.fr/tuto/ipasserelle/divers/mise_a_jour_sme8_vers_sme9

I have started updating this script with a few more contribs and plan to put it in a rpm. I could release an alpha version if you want. The advantage is to create a tgz similar to console backup with all in one. You just have then to reinstall repo for sme9, then reinstall contrib. My update create a list of installed rpm to yum install this list after migration. The disadvantage is it could take some hours to tar all the files, move the tgz and restore it. But if you have a night or a week end this is simple and effective.

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: affa vs backup pc vs dungog rsync backup
« Reply #4 on: April 11, 2018, 08:11:54 PM »
I would be interested in giving the rpm you mentioned a try.
What I am doing is not at a critical point at this time.
I'm trying to upgrade and hoping to not have to re download all the data from my clients servers. Trying to make this as seamless as possible. I'm playing with about 1 tb of data.
Thanks for the info.
If you think you know whats going on, you obviously have no idea whats going on!

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #5 on: April 20, 2018, 06:14:52 AM »
guys please can you help

i have a client with sme 9.2 ( server mode ) including a centos 7 server.

i need to copy 4 x folders, including subfolders and two mysql databases from the centos 7 server to the sme 9.2 server as backups. i then need to send the zipped backups to google drive

i will also require a notice that the backup has taken place on the sme 9.2 server

what do you recommend i use?

affa vs backup pc vs dungog rsync backup vs dar vs rclone

thank you for your help  :-)
« Last Edit: April 20, 2018, 06:16:40 AM by Bud »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #6 on: April 20, 2018, 10:37:09 AM »
FYI I am chiselling away slowly at updating the rsync contrib. I'll update you when I have something working.

Another alternative that I have used for years is unison - basically 2 way rsync with some fancy options. You can set it to just do one way only if required.

I really ought to get round to writing a contrib to configure it, but it isn't hard...

I'm currently running unison version 2.40.102 which is in EPEL

http://www.cis.upenn.edu/~bcpierce/unison/download/releases/unison-2.40.102/unison-2.40.102-manual.html
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: affa vs backup pc vs dungog rsync backup
« Reply #7 on: April 20, 2018, 06:58:45 PM »
I would be interested in giving the rpm you mentioned a try.
What I am doing is not at a critical point at this time.
I'm trying to upgrade and hoping to not have to re download all the data from my clients servers. Trying to make this as seamless as possible. I'm playing with about 1 tb of data.
Thanks for the info.
will do something by the end of the month, quite busy until the 27th.


then need to send the zipped backups to google drive

I might suggest https://wiki.contribs.org/Rclone for that part

for the other question it depends on your needs:
- multiple backups versions in case of disaster and or user doing wrong (backuppc, rsync) ,
- unique backup (rsync or unisson),
- not really a backup but rather a unique  synced copy (rsync or unisson),
- need to have an identical machine ready to replace the other in case of failure (Affa)

most tools would be able to be adapted for all the needs, but are more intended for a specific use, and the one I put in front of the situation, are most likely more adapted. For instance, backuppc will be able to keep a single version of the Centos7 box, but this would be overkill for that prupose, plus it would be stored in a way it is not directly accessible with cli, and thus might not be best option for sync after to a cloud .
Affa is more intended for SME <->SME or Centos<->Centos works, but it still could do, but again might be overkill for the need.

Rsync (not necessary the rsync contrib, but mostly a simple one liner script ) / unisson might be the more suitable from what I understand, but again you must clarify your needs in term of number of version, purpose of the copy (ies), and how you want to access it.

On top of that you might also need an ecryption procedure, at least for the cloud backup, rclone might be able to do the trick for you too

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #8 on: April 22, 2018, 07:46:28 AM »
Jean-Philippe Pialasse and ReetP thank you for the valuable info, much appreciated

Unison is what i think i require

i have installed the Epel repository

please can you explain how do i install the Unison application in sme 9.2

thank you for your support  :-)

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #9 on: April 22, 2018, 12:22:12 PM »
If you can wait til later I'll give you some instructions.

In the meantime a quick search on the interwebs shows lots of guides eg

https://www.masterkenneth.com/2016/06/07/unison-filefolder-sync-for-centosrhel-6/

Note I think you'll need a version number

Eg

yum --enablerepo=epel install unison240

Make sure you can do passwordless logins using ssh keys.

I'll try and paste some basic configs later... there are lots of options but most can be ignored/left as default.

If you are going to test then make sure you setup a dummy directory each end to play with before trying real data !!

May try to build a contrib to generate configs later this week... but trying to fix the rsync contrib currently !!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #10 on: April 22, 2018, 02:09:28 PM »
OK, so here is some stuff from mine. This is on the 'central' server.

Some generic stuff applying to all profiles:

.unison/common

Code: [Select]
# Unison preferences file
#include name - include name profile
#auto - skip non conflicting entries
#auto = true
#batch No Questions. Non-conflicts propagated, conflicts are skipped
batch = true

#silent = true makes silent - sets batch to true automatically
#silent = true

#copythreshhold - size in kb above which it uses rsync
#copythreshold = 1000

# Individual log dir in profile
log = true

#times file mod times are propagated, but not directory times
times = true

# Careful here - make sure you have equivalent users/groups each end if you want to sync user & groups atributes

#group sync group attributes
#group = true

#owner sync owner attributes
owner = true

#numericsids When this flag is set to true, groups and users are synchronized numerically, rather than by name.
#numericids = true

rshargs = -C
sshargs = -C

# Some stuff to generically ignore
ignore = Name *.db
ignore = Name *~
ignore = Name .*~
ignore = Name .~*
ignore = Name *.~
ignore = Name .~*
ignore = Name *.tmp
ignore = Name ~*
ignore = Name Normal.dot
ignore = Name FIFO*
ignore = Name .Trash*
ignore = Name .git*
ignore = Name .komo*

Here's the individual profile:

.unison/oneway_sync.prf

Code: [Select]
# Include Unison preferences file
include common

# Log file for this profile
logfile = /var/log/unison/vps_sql.log

# We are going to pull all DB backups in the remote dir: /root/backup/db to our local dir: /root/backups/VPS
# (I do this from a number of server back to a central server)

# Root dir THIS end
root = //root/backups/VPS

# Root dir Far end
root = ssh://some.remote.server.com:22221//root/backup/db

# Which end do we want to be in control?
# See the differences between force and prefer here
force = ssh://some.remote.server.com:22221//root/backup/db

First run takes a while as it builds the sync data.

To run:

Code: [Select]
unison oneway_sync.prf
Using crontab I actually use a script to check that there are no other instances of unison running first - in the early days on occasion a sync would run and not be completed before the next run (depends on how often you run it and how much data there is). So this will check if the same script is already running.

/root/scripts/oneway_sycnc.sh

Code: [Select]
#!/bin/sh
# From here :
# http://www.franzone.com/2007/09/23/how-can-i-tell-if-my-bash-script-is-already-running/

if [ ! -z "`ps -C \`basename $0\` --no-headers -o "pid,ppid,sid,comm"|grep -v "$$ "|grep -v "<defunct>"`" ]; then
#script is already running - abort
exit 1
fi

# Quick check to make sure the remote end is vaguely up - nmap required
X=`/usr/bin/nmap -PN -p22221 some.remote.server.com |grep open`
       
if [ ! "$X" = "" ]; then
    /usr/bin/unison -silent oneway_sync.prf
fi


Simple crontab

Code: [Select]
#Crontab
02,22,42 * * * * root /root/scripts/oneway_sync.sh >>/dev/null 2>&1

Note you could also add some error reporting / mails etc based on the unison exit code.

HTH - please ask if you have questions, but DO read the unison documentation first !!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #11 on: April 23, 2018, 02:19:25 AM »
ReetP, thank you for your help

where will i find the unison application and folders that need to be edited on the sme 9.2 server?
i only require a one way copy/sync of folders and mysql databases from the centos 7 server to the sme 9.2 server

i then need to send the zipped backups to google drive

i will also require a notice that the backup has taken place on the sme 9.2 server

sorry for the noob question  :P

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #12 on: April 23, 2018, 11:00:49 AM »
unison should be /usr/bin/unison

Conf files (as previoulsy illustrated) go in /root/.unison

Scripts - wherever you choose.

Mail - you can add something to the cron script to check the unison output (see the documentation for the return statuses.

http://www.cis.upenn.edu/~bcpierce/unison/download/releases/unison-2.40.102/unison-2.40.102-manual.html#exit

I'm no guru on bash scripting but there is loads online on how to do it :-)

HTH
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #13 on: April 23, 2018, 11:03:17 AM »
well, my2c:

install google's drive CLI agent on your centos7 machine (google will tell you more)
then you need a script which
- create a db dump (hint: mysqldump)
- create a compressed tar.gz file (hint1: tar, hint2: use YYYYMMDD_backup.tar.gz name)
- use google's client to push the file on remote gdrive and keep last N backup (optional: send an email when done; warning: gdrive doesn't erase deleted file, it's up to you)
- use scp to push files to your server and send an email when done.

believe me, there are thousands of examples out there on how to achieve such a thing..
HTH

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #14 on: April 23, 2018, 11:39:11 AM »
Stefano,

for whatever reason the OP wanted to bring the backups to the SME 9.2 box first (presumably so they can be backed up from that machine locally to say USB)

AS an alternative I guess he could backup the CentOS7 box direct to Googly place AND copy back to the SME box
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #15 on: April 23, 2018, 11:45:23 AM »
well, if so:

- create a db dump (hint: mysqldump)
- create a compressed tar.gz file (hint1: tar, hint2: use YYYYMMDD_backup.tar.gz name)
- use scp to push files to your server and send an email when done.
- use google's client to push the file on remote gdrive and keep last N backup (optional: send an email when done; warning: gdrive doesn't erase deleted file, it's up to you)

TAH-DAH!!! :-D

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #16 on: April 25, 2018, 05:33:54 AM »
ReetP, Stefano, thank you guys. really appreciated

in my " /usr/bin/ " folder i have two file links and one physical file
links " /usr/bin/unison, /usr/bin/unison-2.40 " and a " file " /usr/bin/unison-gtk-2.40 "

file link " /usr/bin/unison > /etc/alternatives/unison "
file link " /usr/bin/unison-2.40 > usr/bin/unison-gtk-2.40 "

the file link in " /etc/alternatives/unison " points to " /usr/bin/unison-gtk-2.40 "

not sure if my terminology makes sense

is this how it should be?

ReetP
" Scripts - wherever you choose " Where do you recommend i place the scripts in your opinion, create a scripts folder?

thanks again guys  :grin:
« Last Edit: April 25, 2018, 05:36:06 AM by Bud »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #17 on: April 25, 2018, 10:46:01 AM »
You seem to have installed the graphical version.....

Should look like this:

[root@server ~]# rpm -qa |grep unison
unison240-text-2.40.102-5.el6.x86_64
unison240-2.40.102-5.el6.x86_64

Have a look, and remove the gtk version.....

Scripts - /usr/bin ? That's where the dehydrated scripts go.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #18 on: April 25, 2018, 05:10:04 PM »
ReetP thank you for your input

this is what it shows
# rpm -qa |grep unison
unison240-2.40.102-5.el6.x86_64
unison240-gtk-2.40.102-5.el6.x86_64


when i do
# yum remove unison
unison is uninstalled

when i do
# yum --enablerepo=epel install unison240
it installs unison however when i again do
# rpm -qa |grep unison
unison240-2.40.102-5.el6.x86_64
unison240-gtk-2.40.102-5.el6.x86_64


how do i install " unison240-text-2.40.102-5.el6.x86_64 " ?

sorry for the noob questions  :-)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #19 on: April 25, 2018, 05:20:53 PM »
Bud

You installed it already. Check with
rpm -q unison
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #20 on: April 25, 2018, 06:32:28 PM »
janet thank you for your input

# yum --enablerepo=epel install unison240
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : unison240-2.40.102-5.el6.x86_64                                                                                                 1/2
  Installing : unison240-gtk-2.40.102-5.el6.x86_64                                                                                             2/2
  Verifying  : unison240-gtk-2.40.102-5.el6.x86_64                                                                                             1/2
  Verifying  : unison240-2.40.102-5.el6.x86_64                                                                                                 2/2

Installed:
  unison240.x86_64 0:2.40.102-5.el6

Dependency Installed:
  unison240-gtk.x86_64 0:2.40.102-5.el6
Complete!

# rpm -q unison
package unison is not installed

# rpm -qa |grep unison
unison240-2.40.102-5.el6.x86_64
unison240-gtk-2.40.102-5.el6.x86_64


so is that correct ?





Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #21 on: April 25, 2018, 07:05:35 PM »
No, you still have the graphical rpm installed as per my previous post.

I showed you how it should look when it you have it correctly installed. unison240-gtk is the graphical front end and you do not need it.

Remove unison240-gtk

Install unison240-text

You may have to do

Code: [Select]
yum remove unison240-gtk unison240
That will probably remove 'unison240'

Then do:

Code: [Select]
yum install unison240-text
That should automatically install 'unison240' again.

Once again, it should look like this when correct:

[root@server ~]# rpm -qa |grep unison
unison240-text-2.40.102-5.el6.x86_64
unison240-2.40.102-5.el6.x86_64
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #22 on: April 26, 2018, 01:05:45 AM »
ReetP i seem yo be having a problem

# yum remove unison240-gtk unison240
Loaded plugins: fastestmirror, smeserver
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package unison240.x86_64 0:2.40.102-5.el6 will be erased
---> Package unison240-gtk.x86_64 0:2.40.102-5.el6 will be erased
--> Finished Dependency Resolution

unison was removed

# yum install unison240-text
Loaded plugins: fastestmirror, smeserver
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.is.co.za
 * smeaddons: mirror.canada.pialasse.com
 * smeextras: mirror.canada.pialasse.com
 * smeos: mirror.canada.pialasse.com
 * smeupdates: mirror.canada.pialasse.com
No package unison240-text available.

cannot seem to install the text version as it is not available

any ideas ?

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #23 on: April 26, 2018, 01:30:11 AM »
Bud

To check if the actual rpm you thought you wanted installed is actually installed do:
rpm -q unison240-text
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #24 on: April 26, 2018, 02:10:38 AM »
I was in a rush earlier.

Forgot --enablerepo=epel
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #25 on: April 27, 2018, 01:43:44 AM »
As a follow up on dungog-rsync I have just about got the web function panel working with updated code.

Now I have a vague idea of what I am doing I hope I can fix the other files more easily. I'll post on the bug once I have something running.

All a matter of personal time !!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #26 on: April 28, 2018, 01:40:45 PM »
ReetP thank you for the update

Looking forward to this

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #27 on: May 23, 2018, 08:53:01 AM »
ReetP

when i do: # unison oneway_sync.prf
i get the following errors

Contacting server...
ssh: connect to host 192.0.0.99 port 22221: Connection refused
Fatal error: Lost connection with the server
Fatal error: exception Util.Fatal("Error in getLogch:
/var/log/unison/vps_sql.log: No such file or directory")

any ideas?  :-)

Offline sages

  • *
  • 182
  • +0/-0
    • http://www.sages.com.au
Re: affa vs backup pc vs dungog rsync backup
« Reply #28 on: May 23, 2018, 09:44:44 AM »
i get the following errors

Contacting server...
ssh: connect to host 192.0.0.99 port 22221: Connection refused
Seems like a clue ;)
It can't connect to the host. Have a look on the target logs and see if anything is there. Have a look and see if the target service is running. Is it listening on the specified port 22221. try and start an ssh connection to 192.0.0.99:22221 with an ssh client and see if you can get a connection to start.
...

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #29 on: May 23, 2018, 10:01:22 AM »
sages thank you for your to help

i can do # ssh 192.0.0.99
it then asks for username and password

when i do # ssh 192.0.0.99:22221
i get an error: ssh: Could not resolve hostname 192.0.0.99:22221: Name or service not known

what service do i need to start or install?

what to do?  :-)

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #30 on: May 23, 2018, 10:54:24 AM »
AFAIK ssh port must be like
Code: [Select]
-p port_number


Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #31 on: May 23, 2018, 11:03:05 AM »
Stefano thank you for your help, much apprciated

so are you saying i must do:

# ssh -p 22 192.0.0.99

i then have to put in the username and password?

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #32 on: May 23, 2018, 11:04:37 AM »
no, you have to do so only if port is <> from 22

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #33 on: May 23, 2018, 11:07:15 AM »
In your case

ssh -p 2221 root@192.0.0.99

If you leave out the user it defaults to current logged in user.

Leave out the port and it defaults to 22

Note it is much better to use keys than passwords.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #34 on: May 23, 2018, 11:20:28 AM »
ReetP and Stefano

# ssh -p 2221 root@192.0.0.99
ssh: connect to host 192.0.0.99 port 2221: Connection refused

# ssh -p 22221 root@192.0.0.99
ssh: connect to host 192.0.0.99 port 22221: Connection refused

# ssh -p 22 root@192.0.0.99
root@192.0.0.99's password:

what to do?  :-)

Offline sages

  • *
  • 182
  • +0/-0
    • http://www.sages.com.au
Re: affa vs backup pc vs dungog rsync backup
« Reply #35 on: May 23, 2018, 11:29:44 AM »
It's suggesting to me that ssh is running and listening on port 22 (as for a default ssh service) but not on port 22221.
...

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #36 on: May 23, 2018, 11:34:15 AM »
sages

i am trying to copy files from one sme 9.2 server to another sme 9.2 server

how do add listening port 22221 on the remote sme 9.2 server?

sorry for the noob questions guys  :P

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #37 on: May 23, 2018, 11:53:54 AM »
well, you'd tell us why you want sshd listening on a different port

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #38 on: May 23, 2018, 11:59:09 AM »
Stefano thank you for your help

i do not want to change any port however ReetP's example of Unision was:

# Root dir Far end
root = ssh://some.remote.server.com:22221//root/backup/db

# Which end do we want to be in control?
# See the differences between force and prefer here
force = ssh://some.remote.server.com:22221//root/backup/db

i understood that i need to also use port 22221

so if i can use port 22 howver i need to forward the password as well.
how do i do that?

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #39 on: May 24, 2018, 12:54:06 AM »
Ahhh. Note it was an EXAMPLE !!!

Personally I always change the default ssh port. Habit....

Check the wiki. Vaguely this from the top of head, but please check.

Code: [Select]
config setprop sshd TCPPort 2221
Code: [Select]
signal-event remoteaccess-update
Next you need to organise youself a passwordless ssh login.

You need some ssh keys on the client machine. Lots of info about on doing this.

Once created copy the PUBLIC key to the remote server /root/.ssh/authorized_keys

Personally I usually only ever use keys to access a server and then disable  password logins... you can do that from the server-manager easily.

Please, have a good read up on sshd, keys etc etc. If you do that you can answer some of your own questions.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #40 on: May 24, 2018, 02:00:37 PM »
ReetP thank you for your guidance, much appreciated

1. Server1 (192.0.0.100 ) - This is the Server Setup that will RECEIVE File(s)/Folders(s)  from the Remote Server ( 192.0.0.99 )
a. # ssh-keygen -t rsa  ( Created Keys in /root/.ssh )
    Key Files Created in " /root/.ssh " are: " id_rsa " and " id_rsa.pub "

2. Server2 (192.0.0.99 ) - This is the REMOTE Server Setup from where i require the Remote File(s)/Folder(s)
    I Copied the Key Files Created from Server1 in " /root/.ssh "  - " id_rsa " and " id_rsa.pub "  to the Server2 " /root/.ssh/authorized_keys " Folder

3. Restarted BOTH Servers

4. On Server1 where i have " unison " Installed i issue the command: # ssh -p 22 root@192.0.0.99

The Answer i get on Server1 is:
# root@192.0.0.99's password:

what now?  :grin:
« Last Edit: May 24, 2018, 02:05:04 PM by Bud »

Offline michelandre

  • *
  • 261
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #41 on: May 25, 2018, 04:47:56 PM »
Hi Bud,

- You have to be in the root personal directory to create a key pair for the root user.
- When you create the keys, you must not use password, only answer with [RETURN] all the way.
- Then you copy only the "id_rsa.pub" into the /root/.ssh/authorized_keys FILE, this is not a directory.

To copy the file from the source server to the destination server you can use:
* * * * * * * * * * * *
cat /root/.ssh/id_rsa.pub | ssh -p SSH_PORT_NUMBER_ON_DESTINATION_SERVER root@destination_ip "cat >> /root/.ssh/authorized_keys"

The authenticity of host '[destination_ip]:ssh_port_number_on_destination_server ([destination_ip]:ssh_port_number_on_destination_server)' can't be established.
RSA key fingerprint is a0:2f:27:ab:cc:d8:a0:57:fc:57:ee:63:dd:58:bb:11.
Are you sure you want to continue connecting (yes/no)?  YES
Warning: Permanently added '[destination_ip]:ssh_port_number_on_destination_server' (RSA) to the list of known hosts.
root@destination_ip's password: ROOT_PASSWORD_ON_THE_REMOTE_SERVER
* * * * * * * * * * * *

Then try to login from the source server to the destination server using:
ssh -p SSH_PORT_NUMBER_ON_DESTINATION_SERVER root@destination_ip
*** You should be in without a password.

Hoping it will help,

Michel-André


Offline michelandre

  • *
  • 261
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #42 on: May 25, 2018, 04:54:23 PM »
Hi again,

If you connect (good or bad) more than 3 times in 15 minutes, AutoBlock of SSHD will give you:
"Connection refused"

For backup, as Jean-Philippe suggested to me using BackupPC, I strongly suggest to disable AutoBlock on remote server or wait 15 minutes and try again. In fact, disable it on all your servers and install Fail2ban instead.

Code: [Select]
config setprop sshd AutoBlock disabled

signal-event remoteaccess-update

Michel-André
« Last Edit: May 25, 2018, 05:05:23 PM by michelandre »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #43 on: May 25, 2018, 06:14:36 PM »
Yes seems your issue is you copied the files to a directory called authorized_keys, not pasted into a FILE called authorized keys.

And NEVER move your private key elsewhere. ONLY the public one.

Might be worth removing all the keys and generating a new set and starting over.

An alternative method to transfer keys:

On client server

Code: [Select]
cd /root/.ssh
Code: [Select]
scp -P 22 id_rsa.pub root@remote.ip://root/.ssh/id_rsa.serv1
Enter password and the file will copy.

Ssh to remote as normal then

Code: [Select]
cd /root/.ssh
Code: [Select]
cat id_rsa.serv1 >> authorized_keys
Exit, then try to log back in. No password should be required.

Note the use of >> as opposed to >

>> is append
> is overwrite

If you use append you can add multiple keys to the authorized_keys file.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: affa vs backup pc vs dungog rsync backup
« Reply #44 on: May 25, 2018, 09:23:45 PM »
Or simply use ssh-copy-id 😉
C'est la fin du monde !!! :lol:

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #45 on: May 26, 2018, 06:46:23 AM »
people thank you for your explanation and patience, really appreciated

ok so i can ssh without entering a password
very simple when you know what to do  :-P

so when i enter: ssh -p 22 root@192.0.0.99 it does login to server 192.0.0.99 without any issues

my “ .unison/oneway_sync.prf “ file

-------------------------------------------

# Include Unison preferences file
include common

# Log file for this profile
logfile = /var/log/unison/vps.log

# We are going to pull all DB backups in the remote dir: /root/backup/db to our local dir: /root/backup/VPS
# (I do this from a number of server back to a central server)

# Root dir THIS end
root = //root/backup/VPS

# Root dir Far end
root = ssh://192.0.0.99:22//home/e-smith/files/shares/data/files/test

# Which end do we want to be in control?
# See the differences between force and prefer here
force = ssh://192.0.0.99:22//home/e-smith/files/shares/data/files/test

-------------------------------------------

when i run the the following command on server 192.0.0.100 where unison is installed to backup files from server 192.0.0.99 to server 192.0.0.100
# unison oneway_sync.prf

Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server

what now?  :-o
really need to get unison to start working



Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #46 on: May 26, 2018, 11:21:26 AM »
Quote
Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server

what now?  :-o

If you searched the interwebs for say "command not found" you'd see the issue....

Bash can't find unison.

Should be in /usr/bin

Try

Code: [Select]
which unison
Or

Code: [Select]
locate unison
Or

Code: [Select]
cd /
find -iname unison

Quote
really need to get unison to start working

And I really need to finish my holiday....
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Bud

  • *
  • 487
  • +0/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #47 on: May 26, 2018, 04:33:10 PM »
ReetP sorry buddy, did not mean to worry you on your holiday.
But thank you for helping  :-)

# which unison
/usr/bin/unison

# locate unison
/etc/alternatives/unison
/root/.unison
/root/.unison/common
/root/.unison/oneway_sync.prf
/usr/bin/unison
/usr/bin/unison-text-2.40
/usr/share/doc/unison240-2.40.102
/usr/share/doc/unison240-2.40.102/COPYING
/usr/share/doc/unison240-2.40.102/NEWS
/usr/share/doc/unison240-2.40.102/README
/usr/share/doc/unison240-2.40.102/unison-manual.html
/var/lib/alternatives/unison
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/releasever
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/releasever
/var/log/unison
/var/log/unison/vps.log

/etc/alternatives/unison
/root/.unison
/root/.unison/common
/root/.unison/oneway_sync.prf
/usr/bin/unison
/usr/bin/unison-text-2.40
/usr/share/doc/unison240-2.40.102
/usr/share/doc/unison240-2.40.102/COPYING
/usr/share/doc/unison240-2.40.102/NEWS
/usr/share/doc/unison240-2.40.102/README
/usr/share/doc/unison240-2.40.102/unison-manual.html
/var/lib/alternatives/unison
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/releasever
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/releasever
/var/log/unison
/var/log/unison/vps.log

/etc/alternatives/unison
/root/.unison
/root/.unison/common
/root/.unison/oneway_sync.prf
/usr/bin/unison
/usr/bin/unison-text-2.40
/usr/share/doc/unison240-2.40.102
/usr/share/doc/unison240-2.40.102/COPYING
/usr/share/doc/unison240-2.40.102/NEWS
/usr/share/doc/unison240-2.40.102/README
/usr/share/doc/unison240-2.40.102/unison-manual.html
/var/lib/alternatives/unison
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/03616b1a452fe6768f6bd591692fa2e3a0d7407f-unison240-text-2.40.102-5.el6-x86_64/releasever
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_data
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/checksum_type
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/command_line
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_revision
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/from_repo_timestamp
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/installed_by
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/reason
/var/lib/yum/yumdb/u/bc3c920156755cb0e8fd172805c125601d157ded-unison240-2.40.102-5.el6-x86_64/releasever
/var/log/unison
/var/log/unison/vps.log

# cd /
# find -iname unison
./etc/alternatives/unison
./var/log/unison
./var/lib/alternatives/unison
./usr/bin/unison

any ideas?  :D

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: affa vs backup pc vs dungog rsync backup
« Reply #48 on: May 26, 2018, 06:37:09 PM »
Quote
# which unison
/usr/bin/unison

So the binary is there locally. I can't remember as its so long since I set it up but you may need a copy at the far end.

You really could do yourself a favour by burying your head in the docs.

This bit may help, especially the part that says 'command not found'......

http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#remote

Please, do a test with a single file/dir first as well....
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation