Support for LTFS
I'd like to use rsync to create backups on tape using LTFS (See: https://github.com/LinearTapeFileSystem/ltfs). I have tried to do so, but performance is unusable low. I attribute this to rsync carrying out read operations at random locations on the tape drive. It would be great if rsync would support LTFS as this would make many existing backup solutions usable on tape.
More details: To save space on the tape,the first backup is a full copy while subsequent backups should create links to previous backups. The initial backup works. When the tape is empty all files are nicely copied to tape. However, on subsequent backups, when files exist on the tape, the tape drives starts to hunt around like crazy.
I used Backintime as a front-end for rsync. The command used for rsync without includes and excludes to make it more readable:
sync --recursive --times --devices --specials --hard-links --human-readable --links --perms --executability --group --owner --info=progress2 --no-inc-recursive --whole-file --delete --delete-excluded -v -i --out-format=BACKINTIME: %i %n%L --link-dest=../../20230114-102905-656/backup --chmod=Du+wx / /media/tape/5/new_snapshot/backup
If I mount ltfs with -o syslogtrace, I can see what ltfs is doing in the syslog:
Backend readpos: (1, 2296175) FM = 10
FUSE release file
FUSE set times
FUSE chmod
FUSE rename
FUSE create file
Backend locate: (1, 63137)
FUSE chmod
Backend readpos: (1, 63137) FM = 6
Backend locate: (1, 2296176)
Backend readpos: (1, 2296176) FM = 10
FUSE flush
Backend locate: (1, 63138)
My impression is that rsync tries to read from the tape at random positions. Random access times on tape can be minutes. I wonder why rsync would need to read from the tape at all. The source directory is on a HDD. Towards the tape rsync should only write (if a file is new or has changed) or create hard-links (if a file exists in the previous backup).
From my naive understanding rsync will compare source and target files which should result in read operations on your tape?