Community discussions

MikroTik App
 
hkusulja
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Fri Apr 13, 2012 1:14 am

Use /fetch url to upload (backup) file to remote https server

Mon Jan 24, 2022 10:39 pm

Hello,
I need help writing script which will create system backup and then upload file to remote https server.
/system/backup/save name=mybackup
/tool fetch http-method=put mode=https http-data=[/file get [/file find name=mybackup.backup] contents] url="https://myserver.domain.com/" http-header-field="Content-Type: application/octet-stream" 
I also need to upload /export file=myconfig

However, it seems to me that issue is that variable limit to 4KB.
Can I somehow directly upload file? (Similar to src-path with FTPS ) ?
Thank you
 
msatter
Forum Guru
Forum Guru
Posts: 2665
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Use /fetch url to upload (backup) file to remote https server

Mon Jan 24, 2022 10:43 pm

Loving my freedom and so, no Twitter, no Meta/Facebook/Instagram/WhatsApp, no Apple and no Alphabet/Google, no Amazon/Cloudfront/AWS. 12% inflation but still giving money to Italy.

Running:
RouterOS 7.2RC6 and 7.21 / Winbox 3.35 64bits

Who is online

Users browsing this forum: millenium7 and 9 guests