A simple GUI tool for backing up data from Knack applications, built on the Knackpy library.
- Connect to Knack applications using your App ID and API Key
- Select specific objects to backup
- Export data to both CSV and JSON formats
- Automatic timestamped backups
- Simple, user-friendly interface
-
Clone this repository:
git clone https://github.com/yourusername/knackpy-backup.git cd knackpy-backup -
Install required dependencies:
pip install knackpyNote: tkinter is included with most Python installations.
Run the application:
python main.py
-
Connect to your Knack app
- Enter your App ID and API Key
- Click "Connect"
-
Select objects to backup
- Check the boxes for the objects you want to backup
- You can use "Select All" to check all objects at once
-
Choose backup location
- Set the directory where backups will be saved
- Each backup will be created in a timestamped folder
-
Start the backup
- Click "Backup Selected"
- Monitor progress in the status bar
- When complete, the tool will show you the backup location
Backups are saved in two formats:
- CSV files: Easy to open in Excel or other spreadsheet software
- JSON files: Complete data including complex field types
The tool includes a command-line version that can be scheduled to run automatically. Here's how to set it up:
Set your Knack credentials as environment variables:
# macOS/Linux
export KNACK_APP_ID="your_app_id"
export KNACK_API_KEY="your_api_key"
export KNACK_BACKUP_DIR="/path/to/backup/directory" # Optional
# Windows (Command Prompt)
set KNACK_APP_ID=your_app_id
set KNACK_API_KEY=your_api_key
set KNACK_BACKUP_DIR=C:\path\to\backup\directory
# Windows (PowerShell)
$env:KNACK_APP_ID="your_app_id"
$env:KNACK_API_KEY="your_api_key"
$env:KNACK_BACKUP_DIR="C:\path\to\backup\directory"-
Open your crontab:
crontab -e
-
Add a line to run the backup daily at 10:19 AM:
21 10 * * * cd /Users/ckinsfather/Desktop/Backup && /usr/bin/python3 scheduled_backup.py
- Open Task Scheduler
- Create a new Basic Task
- Set the trigger (e.g., Daily at 2:00 AM)
- Action: Start a program
- Program/script:
python - Add arguments:
scheduled_backup.py - Start in:
C:\path\to\knackpy-backup
The scheduled backup script creates a log file (knack_backup.log) that records all backup operations. Check this file to monitor the success of your scheduled backups.
- Python 3.6+
- knackpy
- tkinter (included with Python)
- Create regular backups of your Knack application data
- Export data for offline use or analysis
- Move data between Knack applications
- Simplify the process of backing up your Knack data without writing code
This project is licensed under the MIT License - see the LICENSE file for details.
- City of Austin for creating the knackpy library
- Knack for their low-code platform