zdravim , mam zalohu na FTP serveer do predvoleneho adresaru , chcel by som script doplnit este o vytvorenie adresara na ftp servery podla mena mikrotiku a do toho adresaru ktory bude pre kazdy mikrotik jedinecny nahrat subory
dst-path="$ftppath/ SEM VLOZIT SCRIP NA DYNAMICKY ADRESAR $GResult-$BackupConf"
zatial mi to chodi takto
ftphost "a.b.c.d"
ftpuser "mikrotik_ftp"
ftppassword "pass"
ftppath "/mikrotik_backup/"
#GetDate
GDate
GDay
GMonth
GYear
GResult "$GDay $GMonth $GYear"
# file name for system backup
BackupConf (.".backup")
info $BackupConf
# file name for config export
ExportConf (.".rsc")
info $ExportConf
# file name for config export
logConf (.".txt")
info $logConf
/system backup save name=$BackupConf
info message="System backup finished (1/3).";
/export compact file=$ExportConf
info message="Config export finished (2/3)."
/log print file=();
info message="log export finished (3/3)."
# 10s
# upload the system backup
info message="Uploading system backup (1/3)."
/tool fetch address="$ftphost" src-path=$BackupConf user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$BackupConf" upload=yes
# upload the config export
info message="Uploading config export (2/3)."
/tool fetch address="$ftphost" src-path=$ExportConf user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$ExportConf" upload=yes
# upload the LOG
info message="Uploading LOG (3/3)."
/tool fetch address="$ftphost" src-path=$logConf user="$ftpuser" mode=ftp password="$ftppassword" dst-path="$ftppath/$GResult-$logConf" upload=yes