Skip to content

Commit

Permalink
cleanup: Don't remove images/backups volume
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Dec 21, 2024
1 parent e5bbe14 commit b6d7f85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [ "${1:-}" = "force" ]; then
if incus info >/dev/null 2>&1; then
incus list -cn -f csv | grep -v ^cache- | xargs -r incus delete -f
incus image list -cF -fcsv | xargs -r incus image delete
incus admin sql global "DELETE FROM storage_volumes WHERE name NOT LIKE 'cache-%'"
incus admin sql global "DELETE FROM storage_volumes WHERE name NOT LIKE 'cache-%' AND name NOT IN ('images', 'backups')"
rm -Rf /var/log/incus/*

for i in $(zfs list -o name -r default/containers | grep containers/ | grep -v containers/cache-); do zfs destroy -R "$i"; done
Expand Down

0 comments on commit b6d7f85

Please sign in to comment.