VoronTools
VoronTools copied to clipboard
proper way to backup the moonraker sqlite db in autocommit.sh
hello, installing sqlite3 and changing 2 lines of code you could implement a safer way to backup the moonraker sqlite db.
Steps: apt-get install sqlite3
add outfile=$config_folder/moonraker-sql.db
variable in variable declarations
substitute cp ~/printer_data/database/moonraker-sql.db ~/printer_data/config/
with sqlite3 $db_file ".backup $outfile"
you could also check for sqlite3 command existence and decide if do a hot backup or a copy of the archive...