Don't use ':' in backup directory names

':' is not allowed on FAT/exFAT filesystems, so backups to such
drives failed. Use '%Y-%m-%d_%H-%M-%S' instead; existing backups
with the old format still sort correctly. Document the limitations
of FAT/exFAT in the man page.
This commit is contained in:
Fuxino
2026-10-08 18:01:07 +02:00
parent 7d4c43f8ff
commit 5189910131
2 changed files with 12 additions and 2 deletions
+3 -1
View File
@@ -210,7 +210,9 @@ class Backup:
# Function to create the actual backup directory
def define_backup_dir(self) -> None:
"""Define the actual backup dir"""
now = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
# Avoid ':', which is not allowed on FAT/exFAT filesystems.
# Backups created with the old format ('%Y-%m-%d %H:%M:%S') still sort correctly
now = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
self._output_dir = f'{self.output}/simple_backup/{now}'
if self._remote: