This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

backup to FTP every night -sdcard
#1
Hi,
just a question.

I was questionning about doing backup everyday to our ftp of our customer.
Can it be a SDcard killer?

Here some part of our script with archive creation and cleaning file.

Code:
-- prepare files for backup
os.execute('sh /lib/genohm-scada/web/general/backup.sh')


-- create archive
os.execute('cd /lib/genohm-scada/storage && tar -c -z -f ' .. dst .. ' ./')

......
......

-- cleanup
os.execute('cd /home/ftp && rm -rf backup-*')
--os.execute('cd /home/ftp && rm -rf backup_*') --Line 42 is incorrect. It leads to old backups not being removed.
--os.execute('cd /lib/genohm-scada/storage && rm -rf user userlib.luas blockly.luas initscript.lua helpers.js genohm-scada.config filter*')
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply
#2
Your script is outdated, use this: https://kb.logicmachine.net/scripting/ba...email-ftp/
Reply
#3
ok.
your so quick :-))

So with this scipt no problem to backup everyday

because there is still a temp file created, no ?
path = 'backups/LM-' .. os.date('%Y-%m-%d') .. '.zip'

or backups/ are in memory ?

EDIT:
my mistake path are remote folder
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply


Forum Jump: