Skip to content

Instantly share code, notes, and snippets.

@mafredri
Last active January 18, 2024 21:15
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mafredri/e572ff7fa380a5355a8098a8ff9d3d82 to your computer and use it in GitHub Desktop.
Save mafredri/e572ff7fa380a5355a8098a8ff9d3d82 to your computer and use it in GitHub Desktop.
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