Docs / 06
A fresh start.
The same history.
A newer app. The same activity history.
01Back up the things you keep
Quit the desktop app using its tray menu before replacing it. The Python collector can keep recording. Save both your activity database and desktop preferences so you have a complete fallback.
The following commands use the SQLite CLI (sqlite on Arch). The SQLite backup handles a live collector safely. Run the preference copy after quitting the desktop app.
database="$HOME/.local/bin/hyprtrack/collector/hyprtrack.db"
backup_dir="$HOME/.local/share/hyprtrack-backups/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$backup_dir"
sqlite3 "$database" ".backup '$backup_dir/activity.db'"
cp -a "$HOME/.local/share/com.hyprtrack.desktop" \
"$backup_dir/desktop-preferences"
sqlite3 "$backup_dir/activity.db" "PRAGMA integrity_check;"
printf 'Backup: %s\n' "$backup_dir"The integrity result should be ok. The backup directory contains activity.db and desktop-preferences.
02Replace the AppImage
Download a published release into a temporary file, then replace the AppImage at its original location. Change VERSION to the published version you want. These commands stop the replacement if the download fails.
( set -e
VERSION=2.2.2
wget -O ~/.local/bin/hyprtrack-desktop.AppImage.new \
"https://github.com/wrestle-R/HyprTrack/releases/download/v${VERSION}/HyprTrack.Desktop_${VERSION}_amd64.AppImage"
chmod +x ~/.local/bin/hyprtrack-desktop.AppImage.new
mv ~/.local/bin/hyprtrack-desktop.AppImage.new \
~/.local/bin/hyprtrack-desktop.AppImage
)
~/.local/bin/hyprtrack-desktop.AppImageLaunching the new version updates the exported collector script. Your existing database stays at ~/.local/bin/hyprtrack/collector/hyprtrack.db, and the desktop preferences retain their app identifier.
03Verify your history
Reopen the app and check your older dates, mappings, and keybindings. You can also inspect the database:
sqlite3 ~/.local/bin/hyprtrack/collector/hyprtrack.db \
"PRAGMA integrity_check; SELECT COUNT(*) FROM activity_samples;"The integrity check should report ok. After the updated collector restarts, older detailed rows can become permanent daily app totals in activity_daily_summaries. Compare detailed and archived totals together; the raw row count alone can decrease during compaction. Keep the backup until you are satisfied with the update.
Something missing? Help improve the handbook ↗