Compare commits

..

5 Commits

Author SHA1 Message Date
rootzoll
7e2e19085c fix import 2025-11-11 15:48:02 +01:00
rootzoll
2a64a45b46 v2 relative file names 2025-11-11 15:15:36 +01:00
rootzoll
36868bcca3 zip path 2025-11-11 15:07:35 +01:00
rootzoll
ce5f2fc12e try new path 2025-11-11 15:05:18 +01:00
rootzoll
a08f67b578 #5152 migration file v2 2025-11-11 15:00:12 +01:00
4 changed files with 35 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
## What's new in Version 1.12.1 of RaspiBlitz?
- Update: Bitcoin Core v29.2 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-29.2.md)
- Update: Electrum Server in Rust (electrs) v0.10.10 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#01010-jul-19-2025)
- Update: AlbyHub v1.20.0 [details](https://github.com/getAlby/hub/releases/tag/v1.20.0)
- Update: Bitcoin Knots 29.2 (optional) [details](https://github.com/bitcoinknots/bitcoin/releases/tag/v29.2.knots20251010)

2
home.admin/config.scripts/bitcoin.install.sh Executable file → Normal file
View File

@@ -2,7 +2,7 @@
# set version (change if update is available)
# https://bitcoincore.org/en/download/
bitcoinVersion="29.2"
bitcoinVersion="29.0"
# command info

View File

@@ -28,7 +28,7 @@ fi
mode="$1"
# RECOMMENDED UPDATE BY RASPIBLITZ TEAM (latest tested version available)
bitcoinVersion="30.0" # example: 22.0 .. keep empty if no newer version as sd card build is available
bitcoinVersion="" # example: 22.0 .. keep empty if no newer version as sd card build is available
# GATHER DATA
# setting download directory to the current user

View File

@@ -76,14 +76,6 @@ if [ "$1" = "export" ]; then
# collect files to exclude in export in temp file
echo "*.tar.gz" > ~/.exclude.temp
echo "/mnt/hdd/bitcoin" >> ~/.exclude.temp
echo "/mnt/hdd/temp" >> ~/.exclude.temp
echo "/mnt/hdd/lost+found" >> ~/.exclude.temp
echo "/mnt/hdd/app-storage" >> ~/.exclude.temp
echo "/mnt/hdd/snapshots" >> ~/.exclude.temp # keep for legacy reasons (until v2)
echo "/mnt/hdd/torrent" >> ~/.exclude.temp # keep for legacy reasons (until v2)
echo "/mnt/hdd/litecoin" >> ~/.exclude.temp # keep for legacy reasons (until v2)
echo "/mnt/hdd/swapfile" >> ~/.exclude.temp # keep for legacy reasons (until v2)
# get date stamp
datestamp=$(date "+%y-%m-%d-%H-%M")
@@ -97,10 +89,18 @@ if [ "$1" = "export" ]; then
fi
echo "# blitzname=${blitzname}"
# place info files into app-data for export
sudo touch /mnt/hdd/app-data/v2.migration.info
# zip it
echo "# Building the Export File (this can take some time) .."
dataPath=$(readlink -f /mnt/hdd/app-data)
echo "# Building the Export File - this can take some time (${dataPath}) .."
sudo mkdir -p ${defaultDownloadPath}
sudo tar -zcvf ${defaultDownloadPath}/raspiblitz-export-temp.tar.gz -X ~/.exclude.temp /mnt/hdd 1>~/.include.temp 2>/dev/null
# sudo tar -zcvf ${defaultDownloadPath}/raspiblitz-export-temp.tar.gz "${dataPath}" 1>~/.include.temp 2>/dev/null
sudo tar -zcvf "${defaultDownloadPath}/raspiblitz-export-temp.tar.gz" -C "$(dirname "$dataPath")" "$(basename "$dataPath")" 1>~/.include.temp 2>/dev/null
# delete info files from app-data after export
sudo rm /mnt/hdd/app-data/v2.migration.info 2>/dev/null
# get md5 checksum
echo "# Building checksum (can take a while) ..."
@@ -239,11 +239,29 @@ if [ "$1" = "import" ]; then
fi
sudo rm ${importFile}
# Mit rsync übertragen und dabei symbolische Links erhalten
sudo rsync -avK --keep-dirlinks /mnt/hdd/temp/migration_extract/mnt/hdd/ /mnt/hdd/ 2>>${logFile}
if [ "$?" != "0" ]; then
echo "error='migration rsync failed'"
exit 1
isV2Migration=1
# check if its a v2 migration if /mnt/hdd/temp/migration_extract/v2.migration.info exists
if [ -f "/mnt/hdd/temp/migration_extract/app-data/v2.migration.info" ]; then
migrationVersion=2
fi
echo "# Migration Version: ${migrationVersion}" >> ${logFile}
if [ "${migrationVersion}" == "1" ]; then
echo "# Detected OLD migration file ..." >> ${logFile}
# Mit rsync übertragen und dabei symbolische Links erhalten
sudo rsync -avK --keep-dirlinks /mnt/hdd/temp/migration_extract/mnt/hdd/ /mnt/hdd/ 2>>${logFile}
if [ "$?" != "0" ]; then
echo "error='migration rsync failed'"
exit 1
fi
if [ "${migrationVersion}" == "2" ]; then
echo "# Detected v2 migration file ..." >> ${logFile}
# Mit rsync übertragen und dabei symbolische Links erhalten
sudo rsync -avK /mnt/hdd/temp/migration_extract/app-data/ /mnt/hdd/app-data/ 2>>${logFile}
if [ "$?" != "0" ]; then
echo "error='migration rsync failed'"
exit 1
fi
sudo rm /mnt/hdd/app-data/v2.migration.info
fi
sudo rm -rf /mnt/hdd/temp/migration_extract