On Saturday, June 3, 2017 5:40:31 AM CEST Michael R. Lawrence CISSP wrote: > GNU tar can't be told to --empty-file* /var/cache/swap/swap1*
Ah, RFE for --empty-file. That sounds like valid request to me. > ADDING THE LIVE RUINING FILE WILL CRASH TAR/SYSTEM Hm, tar shouldn't crash if some file is changed in parallel (that would be clear bug and reproducer would be needed). Documentation claims that you should avoid such race conditions if you want to have _valid_ backup though. > I'm just not sure how to get tar to add the 1 file as empty... or append > archive as 1 empty file @ path... > > *How to append the empty file in my backup script would be a a plus* , more > elegant... Have a look at '--transform' option: $ tar --transform='s|/tmp/empty-file|/swp/file|' \ /tmp/empty-file \ ... That's definitely not an elegant way. Also: I would be careful to use --transform with --exclude, to my understanding --exclude should be applied against _transformed_ name (but it doesn't happen ATM). Pavel