0

What is the best way to make my tar log more informative? Cat'ing the log shows what was backed up, but tells nothing about the files last update or size.
Eg:
tar cvf /dev/st0 foo* > backup.log

cat backup.log
foo1
foo2
...

I changed it to tar cvf /dev/st0 foo* | xargs ls -lah > backup.log

cat backup.log
-rw----- root root 2k June 6 foo1
-rw----- root root 2k June 2 foo2
...

Is it a good approach or do you know a better solution?

rodfaria
  • 1
  • 1

1 Answers1

0

The standard approach (if you can afford it) is to use commercial backup software such as NetBackup, BackupExec, CommVault, Networker, etc. Not only do they keep track of all the file metadata, but they can also take incremental backups (i.e. only backup new or changed files) in order to save tape space. It's also dead easy to restore files from a point-in-time; you don't have to mess around with maintaining your own index of backups. The actual format on tape is still normally tar.

Your approach may be ok for what you're trying to do, but I wouldn't want to look after more than one server with such a manual technique.

Tom Shaw
  • 3,702
  • 15
  • 23