Hi
Tried with
#!/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" "$DESTDIRNAS"
curl -s --disable-epsv -v -T"/tmp/domoticz_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "$DESTDIRNAS"
curl -s --disable-epsv -v -T"/tmp/telegram_scripts_$TIMESTAMP.tar.gz" -u"$USERNAME:$PASSWORD" "$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!
Now I get this error.
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 openmediavault.local (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: Fri Dec 29 08:06:36 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD cfs_share02
* ftp_perform ends with SECONDARY: 0
< 250 CWD command successful
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (192,168,1,100,228,220).
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connecting to 192.168.1.100 (192.168.1.100) port 58588
* Connected to openmediavault.local (192.168.1.100) port 21 (#0)
> TYPE I
< 200 Type set to I
> STOR domoticz_backup
< 550 domoticz_backup: Not a regular file
* Failed FTP upload: 550
* Remembering we are in dir "cfs_share02/"
* Uploaded unaligned file size (0 out of 581699 bytes)
* 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
< 331 Password required for Marco
> PASS xxxx
< 230-Welcome user
[email protected] to 127.0.1.1 FTP server.
< 230-The local time is: Fri Dec 29 08:06:36 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD cfs_share02
* ftp_perform ends with SECONDARY: 0
< 250 CWD command successful
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (192,168,1,100,229,195).
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connecting to 192.168.1.100 (192.168.1.100) port 58819
* Connected to openmediavault.local (192.168.1.100) port 21 (#0)
> TYPE I
< 200 Type set to I
> STOR domoticz_backup
< 550 domoticz_backup: Not a regular file
* Failed FTP upload: 550
* Remembering we are in dir "cfs_share02/"
* Uploaded unaligned file size (0 out of 226385 bytes)
* 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
< 331 Password required for Marco
> PASS xxxx
< 230-Welcome user
[email protected] to 127.0.1.1 FTP server.
< 230-The local time is: Fri Dec 29 08:06:36 2017
< 230 User Marco logged in
> PWD
< 257 "/" is the current directory
* Entry path is '/'
> CWD cfs_share02
* ftp_perform ends with SECONDARY: 0
< 250 CWD command successful
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (192,168,1,100,227,101).
* Hostname was NOT found in DNS cache
* Trying 192.168.1.100...
* Connecting to 192.168.1.100 (192.168.1.100) port 58213
* Connected to openmediavault.local (192.168.1.100) port 21 (#0)
> TYPE I
< 200 Type set to I
> STOR domoticz_backup
< 550 domoticz_backup: Not a regular file
* Failed FTP upload: 550
* Remembering we are in dir "cfs_share02/"
* Uploaded unaligned file size (0 out of 45 bytes)
* Connection #0 to host openmediavault.local left intact
Verzonden vanaf mijn iPhone met Tapatalk