Updates and backups
Updating
Section titled “Updating”git pullThen restart the server (systemctl --user restart kotiko, or stop ./run.sh and start it
again). It fetches changed dependencies and updates the database by itself. Run
server/install-service.sh again if the release notes say the service file changed.
If you load Kotiko from the repository's extension folder, keep that folder where it is and
select the reload button on Kotiko's card in chrome://extensions. Chrome ties an unpacked
extension's settings to its folder: moved or renamed, it starts with empty settings.
Backups
Section titled “Backups”When an update changes the database, the server first copies it to
backups/kotiko-pre-<version>-<time>.db in the data folder (usually ~/.local/share/kotiko)
and names the file in the log
("Backed up the database to ..."). The newest five copies are kept.
To go back: stop the server, delete kotiko.db-wal and kotiko.db-shm if they're there,
copy the backup over kotiko.db, and start the version you had before.
In server/:
mix kotiko.export --output backup.jsonwrites every word to a Kotiko backup file;mix kotiko.import backup.jsonreads one back;mix kotiko.resetdeletes every word, after asking and after copying the database tobackups/(--yesdoesn't ask,--no-backupskips the copy). Settings, the access key and the Telegram pairing stay.
Kotiko in the browser can export and restore too: see Your data.
Updating from Slovo
Kotiko used to be called Slovo. The first start after the update moves everything over:
- Stop the old server:
systemctl --user stop slovo, or press Ctrl+C in the terminal running./run.sh. (install-service.shstops the old service for you.) - Back up your words (optional; the update never changes the old files):
cp -a ~/.local/share/slovo ~/slovo-backup. - Update and start:
git pull, thenserver/install-service.sh(it replaces theslovoservice withkotikoand keeps the old unit file asslovo.service.bak), or./run.sh. - Check the log: the first start copies
~/.local/share/slovo/slovo.dbto~/.local/share/kotiko/kotiko.dband says "Moved your words from ... (N words)". Your access key is copied too, so the extension stays connected. The old folder is left as a backup with aMOVED-TO-KOTIKO.txtnote in it; delete it once you've checked your words. - If you set
SLOVO_DATA_DIRin.env, rename it toKOTIKO_DATA_DIR(andSLOVO_LOG_SQLtoKOTIKO_LOG_SQL). The old names still work for now, with a warning. The words in that folder are copied tokotiko.dbnext to the oldslovo.db. - Reload the extension in place, as above. Its settings and words carry over.
If the server stops with "Your old Slovo server is still running", stop it (step 1) and start Kotiko again.
