VoronTools icon indicating copy to clipboard operation
VoronTools copied to clipboard

proper way to backup the moonraker sqlite db in autocommit.sh

Open steeveone opened this issue 5 months ago • 2 comments

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...

steeveone avatar Sep 29 '24 16:09 steeveone