Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] AdventureLog update does not update #1331

Open
2 tasks done
JesperDramsch opened this issue Jan 8, 2025 · 6 comments Β· May be fixed by #1334
Open
2 tasks done

[BUG] AdventureLog update does not update #1331

JesperDramsch opened this issue Jan 8, 2025 · 6 comments Β· May be fixed by #1334

Comments

@JesperDramsch
Copy link

βœ… Have you read and understood the above guidelines?

yes

πŸ“œ What is the name of the script you are using?

AdventureLog

πŸ“‚ What was the exact command used to execute the script?

update

πŸ“ Provide a clear and concise description of the issue.

The adventurelog update script does not correctly update the script on the LXC.

Issue in Update script

I have identified the issue to be in the update script.
This line:

mv AdventureLog-${RELEASE} /opt/adventurelog

moves the folder AdventureLog-v.0.8.0 into the folder, but the intention is to update the files.

Comparison to other scripts

Other scripts either use tar to directly or unzip and then rm -rf the existing installation:

rm -rf /opt/wallos

or move the app to a backup location:

mv /opt/partdb/ /opt/partdb-backup

Caveats with AdentureLog

AdventureLog has user-generated data in /opt/adventurelog which needs to be migrated. I only found the media folder in the backend but there could be more. So these additional files have to be handled correctly.

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 12

πŸ”„ Steps to reproduce the issue.

  1. Install version 0.7.1.
  2. Type update

❌ Paste the full error output (if available).

No error, just a non-updated app.

πŸ–ΌοΈ Additional context (optional).

I technically used an advanced installation for a different number and I have changed the IP by hand as per the guide. This does not show in the fancy Proxmox information unfortunately.

But everything else is default.

@oOStroudyOo
Copy link
Contributor

oOStroudyOo commented Jan 8, 2025

So

    unzip -q v${RELEASE}.zip
    mv AdventureLog-${RELEASE} /opt/adventurelog

Becomes

    unzip -q v${RELEASE}.zip
    rm -rf /opt/adventurelog
    mv AdventureLog-${RELEASE} /opt/adventurelog

@JesperDramsch
Copy link
Author

JesperDramsch commented Jan 8, 2025

Only if you want to delete all your media for adventures.

@JesperDramsch
Copy link
Author

I have written a backup script for myself that is specific to the Proxmox LXC configuration. Not sure if this would be useful, and it of course also doesn't include any future updates to save locations:

#!/bin/bash

# Load environment variables
source /opt/adventurelog/backend/server/.env

# Configuration
BACKUP_DIR="$PWD"
MEDIA_DIR="/opt/adventurelog/backend/server/media"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
TEMP_DIR=$(mktemp -d)

# Backup PostgreSQL database
echo "Backing up PostgreSQL database..."
PGPASSWORD="$PGPASSWORD" pg_dump -h "$PGHOST" -U "$PGUSER" -Fc "$PGDATABASE" > "$TEMP_DIR/db_backup.dump"

# Backup media files
echo "Backing up media files..."
tar -czf "$TEMP_DIR/media_backup.tar.gz" "$MEDIA_DIR"

# Backup .env files
echo "Backing up environment configurations..."
cp /opt/adventurelog/backend/server/.env "$TEMP_DIR/server.env"
cp /opt/adventurelog/frontend/.env "$TEMP_DIR/frontend.env"

# Create final tar archive
echo "Creating final backup archive..."
tar -czf "$BACKUP_DIR/adventurelog_backup_$DATE.tar.gz" -C "$TEMP_DIR" .

# Cleanup temporary directory
rm -rf "$TEMP_DIR"

echo "Backup completed successfully! Created: adventurelog_backup_$DATE.tar.gz"

@Aloe-recite
Copy link

same issue here

@JesperDramsch JesperDramsch linked a pull request Jan 8, 2025 that will close this issue
7 tasks
@JesperDramsch
Copy link
Author

I have submitted a PR to fix the update script.

If this gets accepted, that means that you have to go into your Proxmox LXC and before updating, change the version number in /opt/AdventureLogs_version.txt, which will incorrectly show 0.8.0 now. Then you should be able to run update as expected.

@JesperDramsch JesperDramsch changed the title Adventurelog update does not update [BUG] AdventureLog update does not update Jan 8, 2025
@Aloe-recite
Copy link

great, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants