Skip to content

Instantly share code, notes, and snippets.

@mafredri mafredri/rm-backup.sh
Last active Jul 21, 2019

Embed
What would you like to do?
Scripts for the reMarkable tablet (backup and factory reset)
# Creates remarkable_backup-(date).tar.gz with todays date, backs up /home/root.
(
ssh root@10.11.99.1 'tar cf - .' \
| gzip >remarkable_backup-$(date '+%Y-%m-%d').tar.gz
) 2 >err.log
cat err.log
# This deletes most (all?) user generated files from the reMarkable
# and reboots it so that no traces of data or networks are left.
ssh root@10.11.99.1 'rm -rv \
~/.ssh \
~/.config/remarkable/xochitl.conf \
~/.local/share/remarkable/xochitl/* \
~/log.txt \
~/.bash_history \
~/.viminfo \
~/.vim/tmp \
/var/db/*.lease \
/var/lib/misc/udhcpd.leases \
/var/log/journal/*/*.journal* \
/var/log/wtmp \
; \
/sbin/reboot'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.