Opened 2 years ago

Closed 2 years ago

#2700 closed task (fixed)

Error on backup of weblate

Reported by: robe Owned by: robe
Priority: normal Milestone: Unplanned
Component: SysAdmin Keywords:


Got a notice that osgeo4 was unable to pull a snapshot of weblate. I think this might have been because of the auto upgrade of lxd.

Issue is detailed here -

The error is:

 Failed creating instance snapshot record "snap52": Failed initialising instance: Failed creating storage record for snapshot: Insert volume snapshot: UNIQUE constraint failed: storage_volumes_snapshot

restarting the container doesn't work, so had to go with suggestion in that ticket

Change History (1)

comment:1 by robe, 2 years ago

Resolution: fixed
Status: assignedclosed

Fix as noted in above ticket is to increment the sequence

First ssh into osgeo9 host

# fails with above error
lxc snapshot weblate 
lxd sql global "SELECT max(id) FROM storage_volumes_snapshots;"

-- last snapshot id is 390

lxd sql global "SELECT seq FROM sqlite_sequence WHERE name = 'storage_volumes';"

-- last sequence is 182, change to 390 (the last snapshot id)
lxd sql global "UPDATE sqlite_sequence SET seq = 390 WHERE name = 'storage_volumes'"

Now doing a snapshot should work

lxc snapshot weblate
Note: See TracTickets for help on using tickets.