aboutsummaryrefslogtreecommitdiff
path: root/android-backup-mtp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-09-20 20:33:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-09-20 20:33:37 -0300
commite6453010ebcf0ea86f31af03cd41f56b868ba3d9 (patch)
treef48e55015b930b4aec596004a915a14c2d1120d5 /android-backup-mtp
parentc2a3383eb2d75ad9e13eb990513af1b6ecdde658 (diff)
downloadutils-android-e6453010ebcf0ea86f31af03cd41f56b868ba3d9.tar.gz
utils-android-e6453010ebcf0ea86f31af03cd41f56b868ba3d9.tar.bz2
Fixes for android-backup-mtpmain
Diffstat (limited to 'android-backup-mtp')
-rwxr-xr-xandroid-backup-mtp19
1 files changed, 16 insertions, 3 deletions
diff --git a/android-backup-mtp b/android-backup-mtp
index 0cf04e6..5e7823a 100755
--- a/android-backup-mtp
+++ b/android-backup-mtp
@@ -31,8 +31,8 @@ if [ -z "$PROFILE" ]; then
echo ""
echo "1. Log into the profile on the phone."
echo "2. Export the contacts somewhere like Backups/Contacts/contacts.vcf."
- echo "3. Run a local backup to the internal storage (to the .SeedVaultAndroidBackup folder)."
- echo "4. Run Signal and Molly backups (to the Backups folder)."
+ echo "3. Run Signal and Molly backups (to the Backups folder)."
+ echo "4. Run a local backup to the internal storage (to the .SeedVaultAndroidBackup folder)."
echo "4. Mount the profile folder in the computer."
echo "5. Sync the profile in the respective folder."
echo ""
@@ -49,7 +49,20 @@ for tool in $COMMANDS; do
fi
done
-# Backup
+# Mount
go-mtpfs $SHARED &
+
+# Check if mount was successful
+if [ "$?" != "0" ]; then
+ echo "$BASENAME: error: unable to mount profile $PROFILE from phone $PHONE"
+ exit 1
+fi
+
+# Wait a bit
+sleep 1
+
+# Sync
time rsync -av --delete $EXCLUDES $SHARED/ $SYNCED/
+
+# Umount
fusermount -u $SHARED