Koozali.org: home of the SME Server

Affa backup to remote fails with Error (562): RootDir does not exist

Offline CmdLn

  • **
  • 57
  • +0/-0
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:

Code: [Select]
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

Code: [Select]
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

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #1 on: December 06, 2021, 10:17:45 AM »
Some basics please.

What version of SME?

What version of Affa?
...
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 CmdLn

  • **
  • 57
  • +0/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #2 on: December 07, 2021, 10:03:15 AM »
SME version 10.0
Affa version 3.3.1-5

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #3 on: December 07, 2021, 10:17:56 AM »
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.
...
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 CmdLn

  • **
  • 57
  • +0/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #4 on: December 08, 2021, 04:14:19 PM »
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


Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #5 on: December 08, 2021, 04:32:51 PM »
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

...
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 CmdLn

  • **
  • 57
  • +0/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #6 on: December 08, 2021, 04:40:55 PM »
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?

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Affa backup to remote fails with Error (562): RootDir does not exist
« Reply #7 on: December 08, 2021, 05:26:47 PM »
Quote
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.
...
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