.../storage-pools/default/backups

What is this directory? I can’t find any documentation on it. I want to know what created them and if it is safe to delete these “backups” and also is there an lxc command to delete them?

The folder is created in new LXD versions. You can create container backups by doing:

lxc export <container-name> <backup-name>.tar.xz

the folder you’re referencing is used during creation of this backup.

When I make backups, I usually do something like lxc export <container> /data/backup/<backup>.tar.xz. So how do I then remove these files in /var/snap/.../backup?

They should automatically expire after an hour or so. @monstermunchkin may better remember the particular expiry logic.

I seem to remember the plan being that lxc export will create the backup, then download and then delete it. If that last step doesn’t happen because of an error, then the backup expiry should still kick in and have it go away.

No I definitely have files from June and early July. Is it safe to just remove them?

Are those from an existing container or from a container which has since been deleted?
If an existing container, doing:

lxc query /1.0/containers/NAME/backups?recursion=1

Would be interesting to see whether LXD is aware that those backups still exist.
(if not, then deleting should be perfectly safe)

$ lxc query /1.0/containers/Plex/backups?recursion=1
[
	{
		"container_only": false,
		"creation_date": "2018-06-23T14:22:19Z",
		"expiry_date": "2018-06-23T14:52:19Z",
		"name": "Plex/backup0",
		"optimized_storage": false
	},
	{
		"container_only": false,
		"creation_date": "2018-06-23T14:29:16Z",
		"expiry_date": "2018-06-23T14:59:16Z",
		"name": "Plex/backup1",
		"optimized_storage": false
	},
	{
		"container_only": false,
		"creation_date": "2018-06-23T21:20:26Z",
		"expiry_date": "2018-06-23T21:50:26Z",
		"name": "Plex/backup2",
		"optimized_storage": false
	},
	{
		"container_only": false,
		"creation_date": "2018-07-05T14:46:30Z",
		"expiry_date": "2018-07-05T15:16:29Z",
		"name": "Plex/backup3",
		"optimized_storage": false
	},
	{
		"container_only": false,
		"creation_date": "2018-07-05T14:55:11Z",
		"expiry_date": "2018-07-05T15:25:11Z",
		"name": "Plex/backup4",
		"optimized_storage": false
	}
]

Ok, so probably best to delete them through the API then:

lxc query -X DELETE /1.0/containers/Plex/backups/backup0
lxc query -X DELETE /1.0/containers/Plex/backups/backup1
lxc query -X DELETE /1.0/containers/Plex/backups/backup2
lxc query -X DELETE /1.0/containers/Plex/backups/backup3
lxc query -X DELETE /1.0/containers/Plex/backups/backup4

After doing this, my boot drive went from 42G free 70G used to 70G free 42G used. Thank you!