Page 1 of 1

Backup script behaves strange

Posted: Wed May 15, 2019 10:03 am
by neticted
I have more or less standard backup script that runs /system backup and /export file to save configuration and then sens created files via email to backup storage.

I use it for years on number or routers and it works fine.

However, on one router it behaves strangely.

If run form scripts or by schedule only /system backup part works and creates file. Part with /export file and sending files via email does not work. No errors are displayed. Even put commands that should show script progress in log do not work.

BUT... when I copy script and paste it to terminal and run it - it works as expected.

I checked permissions, it is set as everywhere else.

This is not new problem, it occurred long time ago, and expands through several firmware upgrades.

What could cause such behavior?

Re: Backup script behaves strange

Posted: Wed May 15, 2019 11:04 pm
by NetWorker
It does indeed sound like a permissions issue. i don't know what you mean by "everywhere else", I assume you mean "don't-require-permissions"? Check again that it is indeed set to yes.

However it's always best to just enable the required permissions. For my backup script I use
policy=ftp,read,policy,test,password,sensitive 
     dont-require-permissions=no

Re: Backup script behaves strange

Posted: Fri May 24, 2019 11:04 am
by neticted
By "everywhere else" I meant every other router that I use the same script.
I even set more permissions than you.

Re: Backup script behaves strange

Posted: Wed May 29, 2019 11:51 pm
by gepelbaum
Hi, could you copy the program script to analyze, so we can deduce what is happening?
regards