diff --git a/install_ubuntu.sh b/install_ubuntu.sh index fd140d24..e3431076 100755 --- a/install_ubuntu.sh +++ b/install_ubuntu.sh @@ -1,7 +1,7 @@ #!/bin/bash sudo apt-get update sudo apt-get dist-ugprade -sudo apt-get install meld whois zsh tmux vim atop aria2 curl +sudo apt-get install meld whois zsh tmux vim atop aria2 curl pv pixz DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" $DIR/install_common.sh diff --git a/tools/backup_sdcard.sh b/tools/backup_sdcard.sh new file mode 100755 index 00000000..25f5a7b8 --- /dev/null +++ b/tools/backup_sdcard.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [[ -z $1 ]]; then + echo "usage: $0 device_to_clone" + exit +fi + +device=$1 + +timestamp=`date +%Y%M%d` +dest_file="/tmp/$timestamp.dd.xz" + +echo "about to clone $device to $dest_file" +echo "ctrl-c or [enter]" +read + +umount $device? +umount $device + +sudo pv -tpreb $device | dd bs=4M | pixz > $dest_file +