Using rsync to backup my docker containers: rsync -avzP --exclude /home/john/docker/frigate/storage /home/john/docker /home/backup
but the backed up files are using the date of an old directory, in the backup directory…
drwxrwxrwx 5 root root 4096 Jul 28 21:46 .
drwxr-xr-x 7 root root 4096 Jul 20 19:17 ..
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker20260720
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker20260728
-rw------- 1 john john 634 Jul 28 21:34 dockerBackup.txt
ie the original directory is “docker20260720” which is the correct date, but the 2 other directories were copied today (20260728), but have the OLD backups date…??
Please always include the line with the prompt and the command, it is only one line more to copy/paste at the beginning. Now we have to guess if your utterance “in the backup directory” is correct and what it means. Also we can not see the contents of the original directory. How can we compare?
Also for me there is some confusion about the (modification) date of the files and date indications incorporated in file names.
john@media:/home/backup$ ll
total 24
drwxrwxrwx 5 root root 4096 Jul 28 21:46 ./
drwxr-xr-x 7 root root 4096 Jul 20 19:17 ../
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker/
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker20260720/
drwxrwxr-x 9 john john 4096 Jul 20 20:36 docker20260728/
-rw------- 1 john john 634 Jul 28 21:34 dockerBackup.txt
john@media:/home/backup$
I believe my issue is I don’t understand rsync options, completely…
Using rsync -avP /home/john/docker /home/backup
and now understand (I think), that the -a also preserves the creation date of the original ‘top’ directory, hence all backups will have the time/date for the original directory…
Thanks.