Community discussions

MikroTik App
 
zahed009
just joined
Topic Author
Posts: 1
Joined: Mon Jul 17, 2017 10:11 am

Upload MikroTik Backup file to Linuxx Server using FTP

Mon Jul 17, 2017 10:25 am

I want to upload my Mikrotik router backup file to Linux server using FTP. My linux server is Centos 6.9 and I have configured FTP in server. In mikrotik router I have used this script for taking backup and upload it to server.

:log info "backup beginning now"
:global name=backupfile value=([/system identity get name] . "-" . [/system clock get time])
/system backup save name=$backupfile
:log info "backup pausing for 10s"
:delay 10s
:log info "backup being uploaded"
/tool fetch address=server_ip src-path=$backupfile user=ftp_user mode=ftp password=ftp_pass dst-path="/home/ftp-docs/$backupfile" upload=yes
:log info "backup finished"
:delay 20s
:log info "Deleting Backup File"
/file remove $backupfile;
:log info "Deleting Backupfile File"

I have attached the screenshot of the log.
but this script does not working. Please help me for solving this issue.
You do not have the required permissions to view the files attached to this post.
 
etm7469
just joined
Posts: 6
Joined: Wed Apr 22, 2015 10:28 pm
Location: Poland

Re: Upload MikroTik Backup file to Linuxx Server using FTP

Thu Jan 25, 2018 9:21 pm

Hello
For me, it works only without a date. After adding the date, it stops.

/log info "backup beginning now";
:global name=backupfile value=([/system identity get name] .".backup")
/system backup save name=$backupfile;
/log info "backup pausing for 5s";
:delay 5s
/log info "backup being uploaded";
/tool fetch address=hostIP src-path=$backupfile user=username mode=ftp password=password dst-path="/upload/$backupfile" upload=yes;
/log info "backup finished";
:delay 10s
/log info "Deleting Backup File";
/file remove $backupfile;
/log info "Done.";

Who is online

Users browsing this forum: aanjaneyam, BrainPain, Tdaddysimi and 57 guests