hi All,
When i update to a later beta i always create a backup of the database. (I know it also backup automatic when you enable it) But want always the last recent information.
Maybe a idea to let users made a custom filename that will used when you backup a database for example:
database-versionnumber-date : database-v3.9462-31-05-2018.db
Create some pull down menu's where you have some pre configured options. and maybe 1 open field for user custom text
cheers,
Peter
user specific database filename for export
Moderators: leecollings, remb0
-
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
user specific database filename for export
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: user specific database filename for export
Is it that hard to rename the file that is downloaded during the backup?
Besides that, I never had a database issue with updates. I just rely on my daily backup for wurst case scenario's.
Besides that, I never had a database issue with updates. I just rely on my daily backup for wurst case scenario's.
-
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: user specific database filename for export
its just a suggestion... 
And domoticz is automation so why we don't automate this... haha

And domoticz is automation so why we don't automate this... haha
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
-
- Posts: 118
- Joined: Saturday 31 August 2013 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Eindhoven (NL)
- Contact:
Re: user specific database filename for export
There is a script that does the job. I made a dummy button that kicks off a script that saves the database on en different location. You can FTP it, I just store it on a shared disk. It runs at 03:00 and at 14:00 hour.poudenes wrote: ↑Thursday 31 May 2018 11:21 hi All,
When i update to a later beta i always create a backup of the database. (I know it also backup automatic when you enable it) But want always the last recent information.
Maybe a idea to let users made a custom filename that will used when you backup a database for example:
database-versionnumber-date : database-v3.9462-31-05-2018.db
Create some pull down menu's where you have some pre configured options. and maybe 1 open field for user custom text
cheers,
Peter
Here was an other post http://www.domoticz.com/forum/viewtopic ... RS#p111150
Code: Select all
#!/bin/bash
# LOCAL/FTP/SCP/MAIL PARAMETERS
SERVER="10.0.X.X" # IP of Network disk, used for ftp
USERNAME="XX" # FTP username of Network disk used for ftp
PASSWORD="XXXXXXXXX" # FTP password of Network disk used for ftp
DESTDIR="/opt/backup" # used for temorarily storage
DOMO_IP="10.0.X.X" # 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://127.0.0.1:8080/backupdatabase.php > /mnt/nas20/$BACKUPFILE
gzip -9 /mnt/nas20/$BACKUPFILE
### Send to Network disk through FTP
### curl -s --disable-epsv -v -T"/tmp/$BACKUPFILEGZ" -u"$USERNAME:$PASSWORD" "ftp://$SERVER"
### Remove temp backup file
###/bin/rm /tmp/$BACKUPFILEGZ
### Done!
Who is online
Users browsing this forum: No registered users and 1 guest