freedomit-glow-buttons-ubuntu


open-source goodness for your desktop

shared code | shared efforts | shared principles | zero purchase cost
talk to Freedom IT today about getting ubuntu onto YOUR computer

It’s free
and open source

Shared code, shared efforts, shared principles. No cost.

Tar "removing leading slashes" Error

This is not specifically Centos related. All distros have the 'tar' utility. I use tar with bzip2 to do backups on clients server computers. One thing that really annoyed me was the "removing leading slashes from ..." error message from tar that would then result in a return code of non-zero. This, in turn, would then cause the backup to be considered "unsuccessful" by my backup script. Well I have found a solution. When you call tar use the -C to change to the / (root) directory and then for all the directories you wish to backup omit the first slash. For example:

tar cvfj backup.tar.bz2 /home /usr/local /etc

becomes

tar cvfj -C / backup.tar.bz2 home usr/local etc

 

It works well and NO MORE ERROR MESSAGES!


Add this to your website

Add comment


Security code
Refresh

Hmmmmmm.

Impossible?
impossible is just a big word thrown around by small people who find it easier to live in a world they've been given, than to explore the power they have to change it.

impossible is not a fact.
it's an opinion.
impossible is not a declaration.
it's a dare.
impossible is potential.
impossible is temporary.
impossible is nothing.