linuxShortcuts/Services/backup-joplin.sh

16 lines
341 B
Bash
Raw Normal View History

2021-02-23 11:57:25 +00:00
#!/bin/bash
BACKUP_DIR="/home/bruno/Backups/Joplin"
JOPLIN_BIN="/usr/bin/joplin"
2021-02-23 11:57:25 +00:00
$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"