diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-08-29 08:54:17 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-08-29 08:54:17 -0300 |
commit | ae9223c44a422564064201682f557a296611410a (patch) | |
tree | b26b663219050a442cd45b2fea29a3b495e532ed | |
parent | 02b18ec17b95353770877a30898f41923ea91234 (diff) | |
download | blog-ae9223c44a422564064201682f557a296611410a.tar.gz blog-ae9223c44a422564064201682f557a296611410a.tar.bz2 |
Move smartphone backup procedure to scripts repo
-rw-r--r-- | research/smartphone.mdwn | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/research/smartphone.mdwn b/research/smartphone.mdwn index a3ad97a..0894029 100644 --- a/research/smartphone.mdwn +++ b/research/smartphone.mdwn @@ -124,51 +124,7 @@ incluindo a ativação do ADB: Backups ------- -Usaremos o [adb-sync](https://github.com/google/adb-sync) e o [adb-export](https://github.com/snatik/adb-export): - - # Pasta de trabalho - cd ~/load - - # Parâmetros - date="`date +%Y%m%d`" - base="/storage/emulated/0" - previous="data-do-backup-anterior" - storage="/var/backups/remote/celular.`facter domain`/" - - mkdir -p $date && cd $date - - # Se você tiver um backup antigo e quiser aproveitá-lo com hardlinks: - sudo cp -alf $storage/$previous/files files - - # Garante a existência da pasta de arquivos - mkdir -p files - - # Contatos - # Exportar também para .vcf direto do aplicativo de contatos - adb-export.sh -e content://com.android.contacts/contacts - adb shell content query --uri content://com.android.contacts/contacts > contacts.rows - - # Configurações - adb backup -all - - # Arquivos: cópia completa - #adb pull $base files/ - - # Remover cache multimídia do backup - #rm -rf files/Music - - # Arquivos: cópia completa básica - #adb shell ls -1 $base | grep -v ^Music | while read file; do - # adb pull $base/$file files/ - #done - - # Arquivos: cópia incremental básica - adb shell ls -1 $base | grep -v ^Music | while read file; do - adb-sync --delete --reverse $base/$file files/ - done - - # Move backup to storage - cd .. && sudo mv $date $storage/ +Usaremos o [adb-sync](https://github.com/google/adb-sync) e o [adb-export](https://github.com/snatik/adb-export) através do script [android-backup](https://git.fluxo.info/scripts/tree/android-backup). Restauro -------- |