From: Michael K. <mic...@ip...> - 2018-09-29 07:12:47
|
Hi Devs Im thinking that we should mention in the Tarsnap Online Backup doco about what needs to be done if you are restoring to a new box . I think the process is as follows: 1. Build new Astlinux server 2. Copy stored tarsnap.key to /mnt/kd/tarsnap 3. tarsnap -xvf <archive> -C /mnt/kd to restore all files 4. tarsnap –fsck to resync cache so you can backup again. If you don't you get: tarsnap: Sequence number mismatch: Run --fsck tarsnap: Error creating new archive tarsnap: Error exit delayed from previous errors. It may be worth also mentioning the process for restoring the database.dump file: e.g. echo; echo "Restoring database..." echo "Shutting down Asterisk" service asterisk stop >/dev/null sleep 2 sqlite3 /mnt/kd/astdb.sqlite3 'DROP TABLE IF EXISTS astdb;' >/dev/null sqlite3 /mnt/kd/astdb.sqlite3 < /mnt/kd/database.dump >/dev/null echo "Starting Asterisk" service asterisk start >/dev/null sleep 2 PS I am not a scripting expert so I probably have done some things the long way. What do you think? Regards Michael Knill |