Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x Contribs => Topic started by: CmdLn on December 06, 2021, 07:43:08 AM
-
I am trying to setup a backup to a USB drive attached to Raspberry Pi at an offsite location. The USB drive is mounted at the remote side at /media/pi/backup and I have set RootDir in my config. I get the following error when I try to run the backup:
Error (562): RootDir /media/pi/backup does not exist
If I ssh using the using id_rsa_affa key file, generated by Affa, I am able to goto /media/pi/backup folder and create files, delete and view files.
This is my config
remoteHostName=foo.bar
remoteUser=pi
SMEServer=yes
Watchdog=yes
ConnectionCheckTimeout=120
Debug=no
Description=Remote SME server backup
DiskSpaceWarn=normal
RootDir=/media/pi/backup
TimeSchedule=0215
localNice=15
remoteNice=15
rsync--inplace=yes
rsyncCompress=no
rsyncTimeout=900
scheduledKeep=1
sshPort=22
dailyKeep=7
weeklyKeep=4
monthlyKeep=12
yearlyKeep=1
status=enabled
-
Some basics please.
What version of SME?
What version of Affa?
-
SME version 10.0
Affa version 3.3.1-5
-
I think you have things mixed up slightly here.
Affa should be running on the backup server.... Eg the Pi (except we have no ARM version)
It connects to the target server eg SME to be backed up and stores it in the local directory specified.
Please go back and read the wiki again!
Note you could potentially use the affa script on a Pi. It's just a perl script.
Yes the SME stuff does a bit of config for you but nothing special.
-
I have copied over the perl script and tried to start affa. So far I have had to install the following modules:
Filesys::DiskFree
Config::IniFiles
Proc::ProcessTable
but I don't know how to install
esmith::Backup
-
but I don't know how to install
esmith::Backup
Because it isn't designed to run on a non SME based OS. That package is SME specific, as is a lot of the Affa code.
Don't try and use it on your Pi. You might be better just using the Pi as a Samba file store and backup from SME -> Pi
That or use rsync on the Pi.
You probably need to run a remote SSH command to run a SME backup with JUST the settings and then rsync that + your data to the Pi.
Have a look at the code in the Migrate Helper script for ideas on how to do that.
https://wiki.koozali.org/Migratehelper
And this on your SME might work if you mount your Pi shared drive somewhere in SME
https://wiki.koozali.org/Rsync-backup2disk
-
I seem to remember some sort of limitation doing a backup to Samba. I think the backup was too big for that (approx 1.2TB). Also I don't want to do Samba over the internet. Do you perhaps have a recommendation for backing up over the internet?
-
Also I don't want to do Samba over the internet
Indeed.
Could try sshfs (in EPEL) to mount your Pi and use SME backup I guess.
If not some creative coding and rsync will be required.
As mentioned before you could remote run backup on the SME for just the config items and then scp/rsync that + the data to the Pi. See Migrate Helper.
Also have a search in the wiki for 'backup' and read some of the stuff in there.
Someone else may pop up with some other suggestions.