linuxShortcuts/Services/backup-joplin.sh
Bruno Fontes 42344f98a5 Tests, tests and tests
Still not sure why I keep track of those changes, if I don't need them
and do not care about proper handling them.

Anyway, it is here if, some some reason I need it back.
2022-01-22 19:14:01 -03:00

16 lines
341 B
Bash
Executable File

#!/bin/bash
BACKUP_DIR="/home/bruno/Backups/Joplin"
JOPLIN_BIN="/usr/bin/joplin"
$JOPLIN_BIN sync
$JOPLIN_BIN e2ee decrypt
# Delete old backups
cd "$BACKUP_DIR"
rm -r "./joplin.jex"
rm -rf "./MD"
$JOPLIN_BIN --log-level debug export --format jex "$BACKUP_DIR/joplin.jex"
$JOPLIN_BIN --log-level debug export --format md "$BACKUP_DIR/MD"