0

I'm doing some tape backup with tar. The backup is running while all services are up. I know that is a bad thing, but i cannot stop them.

So, sometimes the tar prints this message:

tar: ./data/file.txt: file changed as we read it

Does this mean the copy of ./data/file.txt has canceled when tar checked that the file has changed or will tar continue and copy the file as is ?

PeterMmm
  • 895
  • 16
  • 28
  • If you cannot stop the service, you might want to do a snapshot (using LVM for example) of the filesystem before doing the tarball on the snapshot. – raphink Sep 15 '10 at 13:12

1 Answers1

2

In my experience the file is still backed up, but it may be in an inconsistent state. That is if you had backed up bytes 1-100, and then something changed bytes 80-120, when tar backs up 101-200 you have only half the change in the backup. Most likely, with text files and log files, this is something appended to the end of the file so you're not actually losing anything.

Coding Gorilla
  • 1,938
  • 12
  • 10