Skip to content

๐Ÿ“‹ 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 + C to stop watching.

๐Ÿ”„ Step 6: The Cut Over (Switching Services)

Only perform this AFTER the migration finishes.

  1. Stop Audiobookshelf:
    • On holodeck-subspace: cd projects/subspace_comm && sudo docker compose down
  2. Final Sync (Catch-up):
    • On memory-alpha: Run ./03_start_migration_headless.sh again. It will be very fast (seconds) to catch any last-minute changes.
  3. Update Config:
    • On holodeck-subspace: Edit docker-compose.yml.
    • Change volume: - /mnt/vault/media/audiobooks:/audiobooks
  4. Restart:
    • On holodeck-subspace: sudo docker compose up -d
  5. Verify:
    • Open ABS Web UI. Check if books play.