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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user