feat(sync): publish hostname and quiesce sync for backup
CI / Build & Test (push) Successful in 4m20s
CI / Build & Test (push) Successful in 4m20s
- getSyncStatus: fire-and-forget push device hostname when missing so linked peers see names after opening Sync page - Backup/restore: close sync (corestore) before copy/extract so autopass data is consistent; backup includes autopass/ and autopass-identity.json - Installer: preserve sync data on re-run (comments and messages) - Docs: BACKUP.md sync-in-backup and pause behaviour; SYNC.md backups include sync data
This commit is contained in:
+4
-2
@@ -25,13 +25,15 @@ Write-Host "Stopping any running native host..."
|
||||
Get-Process | Where-Object { $_.Path -like "*holesail-browser-host*" } | Stop-Process -Force -ErrorAction SilentlyContinue
|
||||
|
||||
# ── Preserve user data from any previous installation ─────────────────────────
|
||||
# holesail-browser-storage includes state.json, backups/, and when linked:
|
||||
# autopass/ and autopass-identity.json (sync data). Preserving the whole dir keeps sync identity across re-runs.
|
||||
$StashDir = Join-Path $env:TEMP "holesail-browser-stash-$([System.Guid]::NewGuid().ToString('N'))"
|
||||
$StashStorage = Join-Path $StashDir "holesail-browser-storage"
|
||||
$StashCerts = Join-Path $StashDir "holesail-browser-certs"
|
||||
$HadPrevious = $false
|
||||
|
||||
if (Test-Path $InstallDir) {
|
||||
Write-Host "Preserving existing settings and certificates..."
|
||||
Write-Host "Preserving existing settings, certificates, and sync data..."
|
||||
New-Item -ItemType Directory -Path $StashDir -Force | Out-Null
|
||||
$StorageSrc = Join-Path $InstallDir "holesail-browser-storage"
|
||||
$CertsSrc = Join-Path $InstallDir "holesail-browser-certs"
|
||||
@@ -79,7 +81,7 @@ Write-Host " Binary: $HostBin"
|
||||
|
||||
# ── Restore preserved user data ────────────────────────────────────────────────
|
||||
if ($HadPrevious) {
|
||||
Write-Host "Restoring settings and certificates..."
|
||||
Write-Host "Restoring settings, certificates, and sync data..."
|
||||
if (Test-Path $StashStorage) {
|
||||
Copy-Item $StashStorage (Join-Path $InstallDir "holesail-browser-storage") -Recurse -Force
|
||||
Write-Host " Restored: holesail-browser-storage"
|
||||
|
||||
+4
-2
@@ -40,13 +40,15 @@ pkill -f "holesail-browser/native-host/index.mjs" 2>/dev/null || true
|
||||
pkill -f "holesail-browser-host" 2>/dev/null || true
|
||||
|
||||
# ── Preserve user data from any previous installation ─────────────────────────
|
||||
# holesail-browser-storage includes state.json, backups/, and when linked:
|
||||
# autopass/ and autopass-identity.json (sync data). Preserving the whole dir keeps sync identity across re-runs.
|
||||
STASH_DIR="$(mktemp -d)"
|
||||
STASH_STORAGE="${STASH_DIR}/holesail-browser-storage"
|
||||
STASH_CERTS="${STASH_DIR}/holesail-browser-certs"
|
||||
HAD_PREVIOUS=false
|
||||
|
||||
if [[ -d "$INSTALL_DIR" ]]; then
|
||||
echo "Preserving existing settings and certificates..."
|
||||
echo "Preserving existing settings, certificates, and sync data..."
|
||||
[[ -d "${INSTALL_DIR}/holesail-browser-storage" ]] && \
|
||||
cp -a "${INSTALL_DIR}/holesail-browser-storage" "$STASH_STORAGE" && \
|
||||
echo " Saved: holesail-browser-storage"
|
||||
@@ -89,7 +91,7 @@ chmod +x "$HOST_BIN"
|
||||
|
||||
# ── Restore preserved user data ────────────────────────────────────────────────
|
||||
if [[ "$HAD_PREVIOUS" == "true" ]]; then
|
||||
echo "Restoring settings and certificates..."
|
||||
echo "Restoring settings, certificates, and sync data..."
|
||||
[[ -d "$STASH_STORAGE" ]] && \
|
||||
cp -a "$STASH_STORAGE" "${INSTALL_DIR}/holesail-browser-storage" && \
|
||||
echo " Restored: holesail-browser-storage"
|
||||
|
||||
Reference in New Issue
Block a user