-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve backup restore to redis #1920
Comments
In my opinion option 2 would be the better way
"objects": {
"type": "redis",
"typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379], couch - [port 5984].",
"host": "127.0.0.1",
"port": 6379,
"noFileCache": false,
"maxQueue": 1000,
"connectTimeout": 2000,
"writeFileInterval": 5000,
"options": {
"auth_pass": null,
"retry_max_delay": 5000,
"retry_max_count": 19,
"db": 0,
"family": 0
},
"backup": {
"disabled": false,
"files": 24,
"filesComment": "Minimal number of backup files, after the deletion will be executed according to backupTime settings",
"hours": 48,
"hoursComment": "All backups older than 48 hours will be deleted. But only if the number of files is greater than of backupNumber",
"period": 120,
"periodComment": "by default backup every 2 hours. Time is in minutes. To disable backup set the value to 0",
"path": "",
"pathComment": "Absolute path to backup directory or empty to backup in data directory"
}
},
"states": {
"type": "redis",
"typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379].",
"host": "127.0.0.1",
"port": 6379,
"connectTimeout": 2000,
"writeFileInterval": 30000,
"options": {
"auth_pass": null,
"retry_max_delay": 5000,
"retry_max_count": 19,
"db": 0,
"family": 0
},
"backup": {
"disabled": false,
"files": 24,
"filesComment": "Minimal number of backup files, after the deletion will be executed according to backupTime settings",
"hours": 48,
"hoursComment": "All backups older than 48 hours will be deleted. But only if the number of files is greater than of backupNumber",
"period": 120,
"periodComment": "by default backup every 2 hours. Time is in minutes. To disable backup set the value to 0",
"path": "",
"pathComment": "Absolute path to backup directory or empty to backup in data directory"
}
}, |
I couldn't find some code where the ioBroker.js-controller/packages/cli/src/lib/setup/setupBackup.ts Lines 712 to 718 in f04973d
A third option:
ioBroker.js-controller/packages/cli/src/lib/setup/setupBackup.ts Lines 791 to 796 in f04973d
@foxriver76 I don't know how to setup a dev system of the js-controller, so it is not that easy to contribute here. |
If it’s important I can put it on my list. And yes dev server for controller still planned 😬 |
Situation:
Solution:
curl -sLf https://iobroker.net/install.sh | bash -
)Issue:
jsonl
as database for objects and statesredis
as databaseAfter the restore process, all information have been written to
jsonl
, the redis database is empty but iobroker uses the redis dabase instead of jsonl.Tested with js-controller 4.0.21
Expected result:
The restore process recognizes, that the backup target is redis and uses that configuration of the backup before restoring the databases
or
The restore process keeps the database configuration of the current (new) installation, restores the database to that target and overrides the database configuration of the restored config (in this case from
redis
tojsonl
). When the user wants to use redis afterwards, theiob setup custom
process is required to migrate the data.The text was updated successfully, but these errors were encountered: