aboutsummaryrefslogtreecommitdiff
path: root/research
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-07-12 16:20:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-07-12 16:20:54 -0300
commitc536be51358b8a2651026329c5842b35e9747c49 (patch)
treeedc1e84427cadd8778689a41e66d6bc404b12e39 /research
parent011cc6960117a8842133033be4bca9ca308d7f5b (diff)
downloadblog-c536be51358b8a2651026329c5842b35e9747c49.tar.gz
blog-c536be51358b8a2651026329c5842b35e9747c49.tar.bz2
Updates backup procedure
Diffstat (limited to 'research')
-rw-r--r--research/smartphone.mdwn12
1 files changed, 10 insertions, 2 deletions
diff --git a/research/smartphone.mdwn b/research/smartphone.mdwn
index 8a22087..4b56dae 100644
--- a/research/smartphone.mdwn
+++ b/research/smartphone.mdwn
@@ -126,14 +126,19 @@ 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 $date && cd $date
+ mkdir -p $date && cd $date
# Se você tiver um backup antigo e quiser aproveitá-lo com hardlinks:
- cp -alf /path/to/previous/backup/files files
+ sudo cp -alf $storage/$previous/files files
# Garante a existência da pasta de arquivos
mkdir -p files
@@ -162,6 +167,9 @@ Usaremos o [adb-sync](https://github.com/google/adb-sync) e o [adb-export](https
adb-sync --delete --reverse $base/$file files/
done
+ # Move backup to storage
+ cd .. && mv $date $storage/
+
Restauro
--------