Compare commits

..

4 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
0e00444cb9 Update CHANGELOG.md (#14633)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-21 21:07:46 +00:00
Romain PINSOLLE
9d0c174de1 snowshare: use mv instead of cp for uploads backup to prevent disk fill (#14558)
* snowshare: use mv instead of cp for uploads backup to prevent disk fill

Replaces cp -a with mv when backing up and restoring /opt/snowshare/uploads
during updates. cp -a duplicated the entire uploads directory on each update,
which could fill the disk on instances with large uploads and left stale
backup directories accumulating across failed updates. mv is atomic on the
same filesystem and avoids any data duplication. Also clears any leftover
backup directory before the move to prevent nesting on interrupted updates.

Refs TuroYT/snowshare#258

* snowshare: use UPLOAD_DIR env to persist uploads outside install dir

Set UPLOAD_DIR=/opt/snowshare_data in the env file so uploads live
outside /opt/snowshare and survive CLEAN_INSTALL updates without any
backup/restore step. Existing installations are migrated on first
update by moving uploads to the new location and appending UPLOAD_DIR
to the env file, making the change non-breaking.
2026-05-21 23:07:16 +02:00
community-scripts-pr-app[bot]
60d1998765 Update CHANGELOG.md (#14627)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-21 17:05:26 +00:00
CanbiZ (MickLesk)
1cdfdea583 Proxmox VE 9.2 support (#14624) 2026-05-21 19:04:47 +02:00
3 changed files with 18 additions and 7 deletions

View File

@@ -470,8 +470,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- snowshare: use mv instead of cp for uploads backup to prevent disk fill [@TuroYT](https://github.com/TuroYT) ([#14558](https://github.com/community-scripts/ProxmoxVE/pull/14558))
- Technitium DNS: download release before stopping the service on update [@w-gitops](https://github.com/w-gitops) ([#14616](https://github.com/community-scripts/ProxmoxVE/pull/14616))
- #### ✨ New Features
- Proxmox VE 9.2 support [@MickLesk](https://github.com/MickLesk) ([#14624](https://github.com/community-scripts/ProxmoxVE/pull/14624))
## 2026-05-20
### 🚀 Updated Scripts

View File

@@ -35,16 +35,20 @@ function update_script() {
systemctl stop snowshare
msg_ok "Stopped Service"
msg_info "Backing up uploads"
[ -d /opt/snowshare/uploads ] && cp -a /opt/snowshare/uploads /opt/.snowshare_uploads_backup
msg_ok "Uploads backed up"
if ! grep -q '^UPLOAD_DIR=' /opt/snowshare.env 2>/dev/null; then
msg_info "Migrating uploads to persistent directory"
mkdir -p /opt/snowshare_data
if [ -d /opt/snowshare/uploads ] && [ -z "$(ls -A /opt/snowshare_data 2>/dev/null)" ]; then
mv /opt/snowshare/uploads/* /opt/snowshare_data/ 2>/dev/null || true
mv /opt/snowshare/uploads/.[!.]* /opt/snowshare_data/ 2>/dev/null || true
rmdir /opt/snowshare/uploads 2>/dev/null || true
fi
echo "UPLOAD_DIR=/opt/snowshare_data" >>/opt/snowshare.env
msg_ok "Migrated uploads to /opt/snowshare_data"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
msg_info "Restoring uploads"
[ -d /opt/.snowshare_uploads_backup ] && rm -rf /opt/snowshare/uploads && cp -a /opt/.snowshare_uploads_backup /opt/snowshare/uploads
msg_ok "Uploads restored"
msg_info "Updating Snowshare"
cd /opt/snowshare
$STD npm ci

View File

@@ -21,12 +21,14 @@ fetch_and_deploy_gh_release "snowshare" "TuroYT/snowshare" "tarball"
msg_info "Installing SnowShare"
cd /opt/snowshare
$STD npm ci
mkdir -p /opt/snowshare_data
cat <<EOF >/opt/snowshare.env
DATABASE_URL="postgresql://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="$(openssl rand -base64 32)"
ALLOW_SIGNUP=true
NODE_ENV=production
UPLOAD_DIR=/opt/snowshare_data
EOF
set -a
source /opt/snowshare.env