backup module

utils.backup.create_backup(path)

Create a backup of the specified file.

Copies the file at the given path to a new file with a .bak extension appended.

Parameters:

path (str) – The path to the file to back up.

Raises:

FileNotFoundError – If the specified file does not exist.

Returns:

The path to the created backup file.

Return type:

str