i was edtitng the script whit notepad++ but did not chnage to LF now the script is working fine

Moderator: leecollings
same here. Any solutions yet?sebitop wrote:2 MB this is the point !
if I directly ave the db from the browser, the file is 2 MB and I can restore it.
if I simply use : /usr/bin/curl http://192.168.0.30:8080/backupdatabase.php > /tmp/test.db
test.db is 91kb .... and impossible to restore it
Code: Select all
#!/bin/bash
# LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="192.168.6.10" # IP of Network disk, used for: ftp mail scp
USERNAME="root" # FTP username of Network disk used for: ftp mail scp
PASSWORD="root" # FTP password of Network disk used for: ftp mail scp
DESTDIR="/opt/backup" # used for: local
DOMO_IP="192.168.6.70" # Domoticz IP used for all
DOMO_PORT="8080" # Domoticz port used for all
#
### END OF USER CONFIGURABLE PARAMETERS
#
TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
BACKUPFILE="Xu4_Domoticz_DB_$TIMESTAMP.db" # verander domoticz_xx_ en je backup krijgt deze naam.
BACKUPFILEGZ="$BACKUPFILE".gz
#
### Create backup and ZIP it
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
gzip -9 /tmp/$BACKUPFILE
#
### Send to Network disk through FTP
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/media/hdd/Domoticz_backup/"
#
### Remove temp backup file
/bin/rm /tmp/$BACKUPFILEGZ
#
### Done!
# noot gebruik zo min mogelijk spaties En zorg dat het adres via filezilla gezien is
I've compared the code with my own that does not work, looks the same:Derik wrote: try this..
Code: Select all
#!/bin/bash
# LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="192.168.0.20" # IP of Synology NAS, used for ftp
USERNAME="xxxx" # FTP username of Network disk used for ftp
PASSWORD="xxxx" # FTP password of Network disk used for ftp
DESTDIR="/opt/backup" # used for temorarily storage <-- wordt verderop niet gebruikt??
#DESTDIRNAS="/homes/domoticz/backup/" # Path to your Synology NAS backup folder
DESTDIRNAS="/domoticz/" # Path to your Synology NAS backup folder
DOMO_IP="192.168.0.xxx" # Domoticz IP
DOMO_PORT="8080" # Domoticz port
### END OF USER CONFIGURABLE PARAMETERS
TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
BACKUPFILE="domoticz_$TIMESTAMP.db" # backups will be named "domoticz_YYYYMMDDHHMMSS.db.gz"
BACKUPFILEGZ="$BACKUPFILE".gz
### Create backup and ZIP it
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
gzip -9 /tmp/$BACKUPFILE
tar -zcvf /tmp/domoticz_scripts_$TIMESTAMP.tar.gz /home/pi/domoticz/scripts/
#tar -zcvf /tmp/telegram_scripts_$TIMESTAMP.tar.gz /home/pi/tg/scripts/
### Send to Network disk through FTP
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
curl -s --disable-epsv -v -T"/tmp/domoticz_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
#curl -s --disable-epsv -v -T"/tmp/telegram_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
### Remove temp backup file
/bin/rm /tmp/$BACKUPFILEGZ
/bin/rm /tmp/domoticz_scripts_$TIMESTAMP.tar.gz
#/bin/rm /tmp/telegram_scripts_$TIMESTAMP.tar.gz
### Done!
Code: Select all
#!/bin/sh
####################################
#
# Backup minecraft world to a
# specified folder.
#
####################################
# What to backup. Name of minecraft folder
backup_files="minecraft"
# Where to backup to. I backup to an external hd connected
# to my Pi. enter the folder name where you want your backups to go.
# Just make sure you have enough space to hold 7 days of backups. This
# can be on the pi itself, to an external hard drive or mounted network share.
dest="/et9x00/media/hdd/minecraft"
# Create backup archive filename.
day=$(date +%A)
archive_file="$day-$backup_files-.tar.gz"
# Backup the files using tar.
cd /root && tar zcvf $dest/$archive_file $backup_files
Code: Select all
#!/bin/bash
# LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="192.168.1.100" # IP of Synology NAS, used for ftp
USERNAME="Marco" # FTP username of Network disk used for ftp
PASSWORD="XXXX" # FTP password of Network disk used for ftp
DESTDIR="/opt/backup" # used for temorarily storage
DESTDIRNAS="ftp://openmediavault.local/cfs_share02/domoticz_backup" # Path to your Synology NAS backup folder
DOMO_IP="192.168.1.101" # Domoticz IP
DOMO_PORT="8080" # Domoticz port
### END OF USER CONFIGURABLE PARAMETERS
TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
BACKUPFILE="domoticz_$TIMESTAMP.db" # backups will be named "domoticz_YYYYMMDDHHMMSS.db.gz"
BACKUPFILEGZ="$BACKUPFILE".gz
### Create backup and ZIP it
/usr/bin/curl -s http://$DOMO_IP:$DOMO_PORT/backupdatabase.php > /tmp/$BACKUPFILE
gzip -9 /tmp/$BACKUPFILE
tar -zcvf /tmp/domoticz_scripts_$TIMESTAMP.tar.gz /home/pi/domoticz/scripts/
tar -zcvf /tmp/telegram_scripts_$TIMESTAMP.tar.gz /home/pi/tg/scripts/
### Send to Network disk through FTP
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
curl -s --disable-epsv -v -T"/tmp/domoticz_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
curl -s --disable-epsv -v -T"/tmp/telegram_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "ftp://$SERVER/$DESTDIRNAS"
### Remove temp backup file
/bin/rm /tmp/$BACKUPFILEGZ
/bin/rm /tmp/domoticz_scripts_$TIMESTAMP.tar.gz
/bin/rm /tmp/telegram_scripts_$TIMESTAMP.tar.gz
### Done!
Code: Select all
pi@raspberrypi:~ $ sudo /home/pi/domoticz/scripts/domoticz_backup.sh
tar: Leidende '/' wordt uit lidnamen weggelaten
/home/pi/domoticz/scripts/
/home/pi/domoticz/scripts/python/
/home/pi/domoticz/scripts/python/googlepubsub.py
/home/pi/domoticz/scripts/python/domoticz.py
/home/pi/domoticz/scripts/python/script_device_PIRsmarter.py
/home/pi/domoticz/scripts/python/reloader.py
/home/pi/domoticz/scripts/python/__pycache__/
/home/pi/domoticz/scripts/python/__pycache__/domoticz.cpython-34.pyc
/home/pi/domoticz/scripts/python/__pycache__/reloader.cpython-34.pyc
/home/pi/domoticz/scripts/python/script_time_demo.py
/home/pi/domoticz/scripts/python/script_device_demo.py
/home/pi/domoticz/scripts/lua_parsers/
/home/pi/domoticz/scripts/lua_parsers/example_json.lua
/home/pi/domoticz/scripts/lua_parsers/example_xml.lua
/home/pi/domoticz/scripts/lua_parsers/example_owm.lua
/home/pi/domoticz/scripts/lua_parsers/example.lua
/home/pi/domoticz/scripts/logrotate/
/home/pi/domoticz/scripts/logrotate/domoticz
/home/pi/domoticz/scripts/readme.txt
/home/pi/domoticz/scripts/buienradar_rain_example.pl
/home/pi/domoticz/scripts/templates/
/home/pi/domoticz/scripts/templates/Device.Lua
/home/pi/domoticz/scripts/templates/All.Lua
/home/pi/domoticz/scripts/templates/global_data.dzVents
/home/pi/domoticz/scripts/templates/Time.Lua
/home/pi/domoticz/scripts/templates/Seurity.dzVents
/home/pi/domoticz/scripts/templates/All.dzVents
/home/pi/domoticz/scripts/templates/UserVariable.dzVents
/home/pi/domoticz/scripts/templates/Device.dzVents
/home/pi/domoticz/scripts/templates/Security.Lua
/home/pi/domoticz/scripts/templates/Bare.dzVents
/home/pi/domoticz/scripts/templates/Timer.dzvents
/home/pi/domoticz/scripts/templates/All.Python
/home/pi/domoticz/scripts/templates/UserVariable.Lua
/home/pi/domoticz/scripts/lua/
/home/pi/domoticz/scripts/lua/JSON.lua
/home/pi/domoticz/scripts/lua/script_device_sensorWU.lua
/home/pi/domoticz/scripts/lua/script_time_demo.lua
/home/pi/domoticz/scripts/lua/script_device_demo.lua
/home/pi/domoticz/scripts/lua/script_time_toonselector.lua
/home/pi/domoticz/scripts/dzVents/
/home/pi/domoticz/scripts/dzVents/data/
/home/pi/domoticz/scripts/dzVents/data/README.md
/home/pi/domoticz/scripts/dzVents/.gitignore
/home/pi/domoticz/scripts/dzVents/documentation/
/home/pi/domoticz/scripts/dzVents/documentation/dzvents-smoothing.png
/home/pi/domoticz/scripts/dzVents/documentation/history.md
/home/pi/domoticz/scripts/dzVents/documentation/README.md
/home/pi/domoticz/scripts/dzVents/documentation/pandoc.md
/home/pi/domoticz/scripts/dzVents/documentation/README.wiki
/home/pi/domoticz/scripts/dzVents/generated_scripts/
/home/pi/domoticz/scripts/dzVents/generated_scripts/README.md
/home/pi/domoticz/scripts/dzVents/runtime/
/home/pi/domoticz/scripts/dzVents/runtime/Device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/temperature_humidity_barometer_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/soilmoisture_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/zone_heating_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/opentherm_gateway_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/scene_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/leafwetness_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/gas_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/p1_smartmeter_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/barometer_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/lux_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/temperature_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/scaleweight_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/group_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/percentage_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/generic_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/ampere_1_phase_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/voltage_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/evohome_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/solar_radiation_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/distance_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/pressure_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/ampere_3_phase_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/security_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/wind_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/zwave_thermostat_mode_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/kodi_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/thermostat_setpoint_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/airquality_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/Adapters.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/custom_sensor_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/alert_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/rain_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/uv_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/temperature_humidity_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/electric_usage_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/waterflow_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/text_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/switch_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/soundlevel_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/kwh_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/visibility_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/counter_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/humidity_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/device-adapters/rgbw_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/Time.lua
/home/pi/domoticz/scripts/dzVents/runtime/todo.md
/home/pi/domoticz/scripts/dzVents/runtime/Domoticz.lua
/home/pi/domoticz/scripts/dzVents/runtime/Utils.lua
/home/pi/domoticz/scripts/dzVents/runtime/TimedCommand.lua
/home/pi/domoticz/scripts/dzVents/runtime/persistence.lua
/home/pi/domoticz/scripts/dzVents/runtime/Variable.lua
/home/pi/domoticz/scripts/dzVents/runtime/dzVents.lua
/home/pi/domoticz/scripts/dzVents/runtime/misc/
/home/pi/domoticz/scripts/dzVents/runtime/misc/smoothing.xlsx
/home/pi/domoticz/scripts/dzVents/runtime/HistoricalStorage.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/testIntegration.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/varString.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/secArmedAway.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/stage1.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/vdSwitchDimmer.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/README.md
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/File.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/global_data.lua
/home/pi/domoticz/scripts/dzVents/runtime/integration-tests/stage2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/
/home/pi/domoticz/scripts/dzVents/runtime/tests/testUtils.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testTime.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/data/
/home/pi/domoticz/scripts/dzVents/runtime/tests/data/README.md
/home/pi/domoticz/scripts/dzVents/runtime/tests/testDevice.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testVariable.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testScriptdzVentsDispatching.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testTimedCommand.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/.luacov
/home/pi/domoticz/scripts/dzVents/runtime/tests/generated_scripts/
/home/pi/domoticz/scripts/dzVents/runtime/tests/generated_scripts/internal1.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/generated_scripts/internal2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/.f3.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/f1.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/f1lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/f2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/.f3.lua.swp
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/lua.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scandir/f3.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testEventHelpers.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/tstData.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/README.md
/home/pi/domoticz/scripts/dzVents/runtime/tests/testEventHelpersStorage.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script1.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_wildcard1.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_with_time-contrained_device.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_timer_classic.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_inactive.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_variable2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_incomplete_missing_on.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_notable.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script5.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_timer_table.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_variable1.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script6.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_timer_single.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script7.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script3.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script4.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_incomplete_missing_execute.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_logging.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/global_data.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_security.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_error.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_data.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_variable3.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_with_active_method.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_security_grouped.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_wildcard2.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_combined.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/scripts/script_timer_function.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testfile
/home/pi/domoticz/scripts/dzVents/runtime/tests/devices.lua
/home/pi/domoticz/scripts/dzVents/runtime/tests/testDomoticz.lua
/home/pi/domoticz/scripts/dzVents/runtime/EventHelpers.lua
/home/pi/domoticz/scripts/dzVents/examples/
/home/pi/domoticz/scripts/dzVents/examples/notify for dead system-alive check devices.lua
/home/pi/domoticz/scripts/dzVents/examples/intruder alert.lua
/home/pi/domoticz/scripts/dzVents/examples/random night light.lua
/home/pi/domoticz/scripts/dzVents/examples/fake presence.lua
/home/pi/domoticz/scripts/dzVents/examples/garage door.lua
/home/pi/domoticz/scripts/dzVents/examples/check dead devices.lua
/home/pi/domoticz/scripts/dzVents/examples/external_light.lua
/home/pi/domoticz/scripts/dzVents/examples/respond to switch.lua
/home/pi/domoticz/scripts/dzVents/examples/check dead devices by desc.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/
/home/pi/domoticz/scripts/dzVents/examples/templates/bare.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/variable.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/complete.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/timer.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/device.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/global_data.lua
/home/pi/domoticz/scripts/dzVents/examples/templates/security.lua
/home/pi/domoticz/scripts/dzVents/examples/check battery levels.lua
/home/pi/domoticz/scripts/dzVents/examples/schedule fish pond pump.lua
/home/pi/domoticz/scripts/dzVents/examples/leak_detection.lua
/home/pi/domoticz/scripts/dzVents/examples/only run script when button pressed.lua
/home/pi/domoticz/scripts/dzVents/examples/calc temp delta.lua
/home/pi/domoticz/scripts/dzVents/examples/simple room heating with hysteresis control.lua
/home/pi/domoticz/scripts/dzVents/examples/get sensor values.lua
/home/pi/domoticz/scripts/dzVents/scripts/
/home/pi/domoticz/scripts/dzVents/scripts/README.md
/home/pi/domoticz/scripts/_domoticz_main.bat
/home/pi/domoticz/scripts/restart_domoticz
/home/pi/domoticz/scripts/_domoticz_main
/home/pi/domoticz/scripts/update_domoticz
/home/pi/domoticz/scripts/script_time_toonselector.lua
/home/pi/domoticz/scripts/download_update.sh
/home/pi/domoticz/scripts/domoticz_backup.sh
tar: Leidende '/' wordt uit lidnamen weggelaten
tar: /home/pi/tg/scripts: Functie stat() is mislukt: Bestand of map bestaat niet
tar: Gestopt in fouttoestand vanwege eerdere fouten
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connected to 192.168.1.100 (192.168.1.100) port 21 (#0)
< 220 ProFTPD 1.3.5 Server ready.
> USER Marco
< 331 Password required for Marco
> PASS XXXX
< 230-Welcome user [email protected] to 127.0.1.1 FTP server.
< 230-The local time is: Thu Dec 28 22:15:02 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD ftp:
* ftp_perform ends with SECONDARY: 0
< 550 ftp:: Bestand of map bestaat niet
* Server denied you to change to the given directory
* Uploaded unaligned file size (0 out of 587074 bytes)
* Connection #0 to host 192.168.1.100 left intact
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connected to 192.168.1.100 (192.168.1.100) port 21 (#0)
< 220 ProFTPD 1.3.5 Server ready.
> USER Marco
< 331 Password required for Marco
> PASS XXXX
< 230-Welcome user [email protected] to 127.0.1.1 FTP server.
< 230-The local time is: Thu Dec 28 22:15:02 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD ftp:
* ftp_perform ends with SECONDARY: 0
< 550 ftp:: Bestand of map bestaat niet
* Server denied you to change to the given directory
* Uploaded unaligned file size (0 out of 226393 bytes)
* Connection #0 to host 192.168.1.100 left intact
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connected to 192.168.1.100 (192.168.1.100) port 21 (#0)
< 220 ProFTPD 1.3.5 Server ready.
> USER Marco
< 331 Password required for Marco
> PASS XXXX
< 230-Welcome user [email protected] to 127.0.1.1 FTP server.
< 230-The local time is: Thu Dec 28 22:15:02 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD ftp:
* ftp_perform ends with SECONDARY: 0
< 550 ftp:: Bestand of map bestaat niet
* Server denied you to change to the given directory
* Uploaded unaligned file size (0 out of 45 bytes)
* Connection #0 to host 192.168.1.100 left intact
pi@raspberrypi:~ $
Code: Select all
tar -zcvf /tmp/telegram_scripts_$TIMESTAMP.tar.gz /home/pi/tg/scripts/
tar: Leidende '/' wordt uit lidnamen weggelaten
tar: /home/pi/tg/scripts: Functie stat() is mislukt: Bestand of map bestaat niet
tar: Gestopt in fouttoestand vanwege eerdere fouten
Code: Select all
> STOR domoticz_backup
< 550 domoticz_backup: Not a regular file
* Failed FTP upload: 550
* Remembering we are in dir "cfs_share02/"
Code: Select all
DESTDIRNAS="ftp://openmediavault.local/cfs_share02/domoticz_backup/" # Path to your Synology NAS backup folder
Think your are the only one that can confirm whether it worked fine by checking the NAS, but the log states it successfully uploaded 2 files.astrapowerrr wrote: ↑Friday 29 December 2017 13:22 So this should be correct now?
i@raspberrypi:~ $ sudo /home/pi/domoticz/scripts/domoticz_backup.sh
tar: Leidende '/' wordt uit lidnamen weggelaten
/home/pi/domoticz/scripts/
-snip-
/home/pi/domoticz/scripts/domoticz_backup.sh
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connected to openmediavault.local (192.168.1.100) port 21 (#0)
< 220 ProFTPD 1.3.5 Server ready.
> USER Marco
-snip-
< 200 Type set to I
> STOR domoticz_20171229131837.db.gz
< 150 Opening BINARY mode data connection for domoticz_20171229131837.db.gz
} [data not shown]
* We are completely uploaded and fine
* Remembering we are in dir "cfs_share02/domoticz_backup/"
< 226 Transfer complete
* Connection #0 to host openmediavault.local left intact
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connected to openmediavault.local (192.168.1.100) port 21 (#0)
< 220 ProFTPD 1.3.5 Server ready.
> USER Marco
-snip-
> TYPE I
< 200 Type set to I
> STOR domoticz_scripts_20171229131837.tar.gz
< 150 Opening BINARY mode data connection for domoticz_scripts_20171229131837.tar.gz
} [data not shown]
* We are completely uploaded and fine
* Remembering we are in dir "cfs_share02/domoticz_backup/"
< 226 Transfer complete
* Connection #0 to host openmediavault.local left intact
Verzonden vanaf mijn iPhone met Tapatalk
Code: Select all
#!/bin/bash
## LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="ftp://192.168.1.150:21" # IP of Network disk, used for: ftp mail scp
USERNAME="xx" # FTP username of Network disk used for: ftp mail scp
PASSWORD="xx" # FTP password of Network disk used for: ftp mail scp
DESTDIR="/opt/backup" # used for: local
DOMO_IP="192.168.1.22" # Domoticz IP used for all
DOMO_PORT="8080" # Domoticz port used for all
## END OF USER CONFIGURABLE PARAMETERS
TIMESTAMP=`/bin/date +%Y%m%d%H%M%S`
BACKUPFILEDIR="domoticz_$TIMESTAMP.tar.gz" # Change the xxx to yours
### Create backup and ZIP it
tar -zcvf /tmp/$BACKUPFILEDIR /home/pi/domoticz/scripts/ # Change the xxx to yours # Or try /home/pi/domoticz/
### Send to Network disk through FTP
curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEDIR" -u"$USERNAME:$PASSWORD" "ftp://192.168.1.150/Dennis/Backup/RPi/domoticz/" # Change the ftp to yours !!!
### Remove temp backup file
/bin/rm /tmp/$BACKUPFILEDIR
### Done!]
Users browsing this forum: No registered users and 1 guest