๐ Procedure: Audiobookshelf Migration (Safe Mode)
Objective: Move Audiobookshelf data from the old storage (infra_storage) to the new Unified Vault (vault) without losing data or service availability.
Prerequisites:
* You are logged into memory-alpha (192.168.1.13).
* You have navigated to the script directory: cd ~/projects/AI/code/projects/migration_audiobookshelf.
๐ Step 1: Disable Daily Reboots
Ensure memory-alpha does not reboot in the middle of the copy.
1. Check for auto-reboots: grep -r "Automatic-Reboot" /etc/apt/apt.conf.d/
2. If found, edit the file and set "Unattended-Upgrade::Automatic-Reboot "false";.
3. (Agent Verification: The agent has confirmed no root cron job exists).
๐ Step 2: Setup Connections
Run the setup script to ensure both Old and New storage are mounted.
./01_setup_mounts.sh
- Expected Output: "โ SUCCESS: Both storage locations are ready..."
๐งช Step 3: Dry Run (Test)
Run the test script. It will verify it can read your books.
./02_dry_run_sync.sh
- Action: Look at the output. Do you see your book titles?
- Note: No files are moved yet.
๐ Step 4: Start Migration (Headless)
Start the real copy. This runs in the background.
./03_start_migration_headless.sh
- Output: It will give you a Process ID and verify it started.
- Action: You can now safely close your terminal if you want.
๐บ Step 5: Monitor Progress
Check in on the copy process anytime.
./04_monitor_migration.sh
- Action: Press
Ctrl + Cto stop watching.
๐ Step 6: The Cut Over (Switching Services)
Only perform this AFTER the migration finishes.
- Stop Audiobookshelf:
- On
holodeck-subspace:cd projects/subspace_comm && sudo docker compose down
- On
- Final Sync (Catch-up):
- On
memory-alpha: Run./03_start_migration_headless.shagain. It will be very fast (seconds) to catch any last-minute changes.
- On
- Update Config:
- On
holodeck-subspace: Editdocker-compose.yml. - Change volume:
- /mnt/vault/media/audiobooks:/audiobooks
- On
- Restart:
- On
holodeck-subspace:sudo docker compose up -d
- On
- Verify:
- Open ABS Web UI. Check if books play.