Community discussions

MikroTik App
 
01101110110110
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Thu Apr 12, 2012 8:19 pm

0 bytes attached backup file

Fri Jul 19, 2013 11:31 pm

I have a scheduled script that runs twice a month to mail me backups of the server, however sometimes the files that arrive are 0 bytes, specially the ones sent during the automated schedule, however the files on the server itself aren't 0 bytes. If I trigger the script manually it sends a proper backup [edit: apparently that too no longer works]. Any idea why ? Here is a copy of the script, its modified from one I found on the wiki.
:log info "backup beginning now"
:global backupfile ([/system identity get name] . "-" . [/system clock get time])
/system backup save name=$backupfile
:log info "backup pausing for 20s"
# Registering email
/system script run 17 #( contains all info to get mails working)
:delay 20s
:log info "backup being emailed"
/tool e-mail send to="*****@yahoo.com" subject=([/system identity get name] . \
" Backup") file=$backupfile 
:log info "backup finished"
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: 0 bytes attached backup file

Tue Jul 23, 2013 2:58 am

try to increase the delay. also, check whether there are some 'email' errors in Log
 
01101110110110
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 81
Joined: Thu Apr 12, 2012 8:19 pm

Re: 0 bytes attached backup file

Wed Jul 24, 2013 10:04 pm

I've already increased the delay several times, originally it was just 10, in this script it was 20 and I've gone and made it 60 seconds later on. Also the email stuff takes time to parse as well, and I'm sure there are no errors there, as I do receive an email from the server, just the attachment that arrives with it is 0 bytes. I tried copying the backup file manually (drag/drop from files menu) and it wouldn't copy, yet older backups are copied successfully. Its as if the backup itself is corrupted, is there a way to test the backup file without restoring it & interrupting the service ? Every single backup file for a few weeks has the same issue, I cannot copy them from the files menu.

edit:
ok I've tried taking a manual backup through terminal and it resulted in a smaller backup file, alittle under 1mb and it copied successfully. While the script is producing 2mb backup files each bigger than the previous backup. Any idea why ?

edit2:
It seems I've lost most of the graph data on the server for some reason, I'm guessing that explains the lost backup size

Who is online

Users browsing this forum: Bing [Bot], holvoetn, Kuwait, mrz, patrikg, regisc, sinisa and 125 guests