]> gitweb.fluxo.info Git - utils-android.git/commitdiff
Fixes for android-backup-mtp
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Sep 2024 23:33:37 +0000 (20:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Sep 2024 23:33:37 +0000 (20:33 -0300)
android-backup-mtp

index 0cf04e6a0564cbee5493c4e453294db80e554f18..5e7823a6d1b99088368f6310e9348452fd278531 100755 (executable)
@@ -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