Snapshot naming + Filename

Would it be possible to have the snapshot name I choose in some capacity reflect on the actual filename of the snapshot instead of:
Sometimes I need to find something in an old snapshot (backed up to NAS) and the name would make it much simpler.
I know there will be an issue with some characters and white spaces but perhaps that could be resolved somehow.

Came here looking for the same solution. Backup file names should be meaningful, at least with respect to the date made.

Anyway, I wrote a quick script tonight that may help someone else. On my personal server, I’ve done the manual install and haven’t setup the “hass” binary yet, so this script might not be as useful to someone who can specify the backup name via CLI. Nevertheless, here it is:


	# stat -c %w "$1" --format="%Y"
	date -r "$1" +'%Y-%m-%d_%I-%M%P'
	local FILENAME=$(get_file_create_datetime "$1")" - Home Assistant Backup.tar"
	echo "$FILENAME"
	local DIR=$(dirname "$1")
	local FILENAME=$(make_file_backup_name "$1")

	if [ "$1" != "$FILEPATH" ] ; then
		mv "$1" "$FILEPATH"
	for FILE_PATH in "$1"/*
		rename_backup "$FILE_PATH"

rename_all_backups "$HOME/.homeassistant/backups"

Run the script and it will rename all backup files according to their creation date. Of course, you may want to adjust the hard-coded path, date format, or other parts. Feel free to tweak and upgrade.