Eirikr70
Posts: 14
Joined: Mon Feb 03, 2020 9:07 pm

Strange behavior of unison called by CRON

Mon Feb 03, 2020 9:22 pm

Hello, I have a Raspberry Pi 4 and an ASUS laptop with Linux Mint. I use my Raspberry as a NAS, and synchronise it with my laptop, through SSH with asymmetric keys. My unison configuration file is :

Code: Select all

# Unison preferences
confirmbigdel = true
dontchmod = true
group = false
ignore = Path timeshift/*
ignore = Path $RECYCLE.BIN/*
ignore = Path System Volume Information/*
ignore = Path .Trash-1000/*
label = 
owner = false
perms = 0
prefer = newer
root = /mnt/7267B0E9167B0C2D
root = ssh://pi@x.x.x.x:x//nas
silent = true
sshargs = -C
It works perfectly when called directly. But if I try to call it through CRON

Code: Select all

@hourly /usr/bin/unison -batch RaspiNas &
it fails

Code: Select all

Fatal error: Lost connection with the server
Has anyone found a solution to that kind of problem ?

Return to “Networking and servers”