cleanup: remove 2,369 lines of dead code
Removed backup files and unused legacy scanner function. All code verified as unreferenced.
This commit is contained in:
61
README.md
61
README.md
@@ -65,58 +65,35 @@ RedFlag lets you manage software updates across all your servers from one dashbo
|
||||
|
||||
---
|
||||
|
||||
## 🚨 Breaking Changes (v0.1.23)
|
||||
## 🚨 Breaking Changes & Automatic Migration (v0.1.23)
|
||||
|
||||
**THIS IS NOT A SIMPLE UPDATE** - Complete rearchitecture from monolithic to multi-subsystem security architecture.
|
||||
**THIS IS NOT A SIMPLE UPDATE** - This version introduces a complete rearchitecture from a monolithic to a multi-subsystem security architecture. However, we've built a comprehensive migration system to handle the upgrade for you.
|
||||
|
||||
### **What Changed**
|
||||
- **Security**: Machine binding enforcement (v0.1.22+ minimum), Ed25519 signing required
|
||||
- **Architecture**: Single scan → Multi-subsystem (storage, system, docker, packages)
|
||||
- **Paths**: `/var/lib/aggregator/` → `/var/lib/redflag/agent/`, `/etc/aggregator/` → `/etc/redflag/agent/`
|
||||
- **Database**: Separate tables for metrics, docker images, storage metrics
|
||||
- **UI**: New approval/reject workflow, real security metrics, frosted glass design
|
||||
- **Security**: Machine binding enforcement (v0.1.22+ minimum), Ed25519 signing required.
|
||||
- **Architecture**: Single scan → Multi-subsystem (storage, system, docker, packages).
|
||||
- **Paths**: The agent now uses `/etc/redflag/` and `/var/lib/redflag/`. The migration system will move your old files from `/etc/aggregator/` and `/var/lib/aggregator/`.
|
||||
- **Database**: The server now uses separate tables for metrics, docker images, and storage metrics.
|
||||
- **UI**: New approval/reject workflow, real security metrics, and a frosted glass design.
|
||||
|
||||
### **RECOMMENDED: Full Uninstall & Fresh Install**
|
||||
### **Automatic Migration**
|
||||
The agent now includes an automatic migration system that will run on the first start after the upgrade. Here's how it works:
|
||||
|
||||
```bash
|
||||
# COMPLETE UNINSTALL - Remove all previous versions
|
||||
sudo systemctl stop redflag-agent 2>/dev/null || true
|
||||
sudo systemctl disable redflag-agent 2>/dev/null || true
|
||||
sudo rm -f /etc/systemd/system/redflag-agent.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo userdel redflag-agent 2>/dev/null || true
|
||||
1. **Detection**: The agent will detect your old installation (`/etc/aggregator`, old config version).
|
||||
2. **Backup**: It will create a timestamped backup of your old configuration and state in `/etc/redflag.backup.{timestamp}/`.
|
||||
3. **Migration**: It will move your files to the new paths (`/etc/redflag/`, `/var/lib/redflag/`), update your configuration file to the latest version, and enable the new security features.
|
||||
4. **Validation**: The agent will validate the migration and then start normally.
|
||||
|
||||
# REMOVE ALL OLD DATA
|
||||
sudo rm -rf /var/lib/aggregator/
|
||||
sudo rm -rf /var/lib/redflag/
|
||||
sudo rm -rf /etc/aggregator/
|
||||
sudo rm -rf /etc/redflag/
|
||||
**What you need to do:**
|
||||
|
||||
# REMOVE DOCKER STUFF (BE SURE YOU'RE IN REDFLAG FOLDER)
|
||||
cd /path/to/RedFlag # IMPORTANT: Be in RedFlag directory
|
||||
docker-compose down -v 2>/dev/null || true
|
||||
docker system prune -f 2>/dev/null || true
|
||||
```
|
||||
- **Run the agent with elevated privileges (sudo) for the first run after the upgrade.** The migration process needs root access to move files and create backups in `/etc/`.
|
||||
- That's it. The agent will handle the rest.
|
||||
|
||||
### **Manual Migration (Advanced Users Only)**
|
||||
|
||||
If you really need to preserve data:
|
||||
|
||||
1. **Backup old data**:
|
||||
```bash
|
||||
sudo cp -r /var/lib/aggregator/ ~/aggregator-backup
|
||||
sudo cp -r /etc/aggregator/ ~/aggregator-config-backup
|
||||
```
|
||||
|
||||
2. **Follow fresh install instructions** below
|
||||
3. **Manual data migration** (not supported - you're on your own)
|
||||
|
||||
### **No Support for Automatic Migration**
|
||||
|
||||
At this alpha stage, automated migration is not worth the complexity. The new architecture is fundamentally different and migration would be fragile.
|
||||
### **Manual Intervention (Only if something goes wrong)**
|
||||
If the automatic migration fails, you can find a backup of your old configuration in `/etc/redflag.backup.{timestamp}/`. You can then manually restore your old setup and report the issue.
|
||||
|
||||
**Need Migration Help?**
|
||||
If you're one of the few existing v0.1.18 users who needs migration support, join our Discord server and ask - I'll help you through it manually.
|
||||
If you run into any issues with the automatic migration, join our Discord server and ask for help.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user