LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-25-2014, 08:44 PM   #1
cilbuper
Member
 
Registered: Mar 2008
Posts: 141

Rep: Reputation: 0
Question Tar fails on system backup - need to backup remote web server


OS = CentOS 6.5
I have root access, looged in as root. I've tried this command:
#tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/root/dnd /

It processes the files and then I get this:
.....all previous added files
/bin/dmesg
/bin/unlink
/bin/env
/bin/ls
tar: /: file changed as we read it
tar: Exiting with failure status due to previous errors
[root@ABCDEFG/]#

This is a dedicated web server at an online hosting company. I want to d a full system backup. If I can't do it this way, what are my other options? I know how to do things via SSH and rsync but am not sure it an entire system can be backed up this way or not. at my office I have windows and linux boxes so I can use either.

any suggestions on what the problem is or what I can do?

Also, if i do a download backup, I need to exclude the /root/dnd folder as it is really large. Any idea how?

Last edited by cilbuper; 08-25-2014 at 08:48 PM. Reason: mis-powt - early submission
 
Old 08-25-2014, 08:46 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by cilbuper View Post
OS = CentOS 6.5
I have root access, looged in as root. I've tried these two commands:
#tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/root/dnd
#tar -cvpzf system_backup.tar.gz --exclude=system_backup.tar.gz --exclude=/root/dnd
tar: Cowardly refusing to create an empty archive
You told it to create an empty archive... it said no. (You did not specify anything to include)

Last edited by astrogeek; 08-25-2014 at 08:53 PM.
 
Old 08-26-2014, 12:28 AM   #3
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by cilbuper View Post
tar: /: file changed as we read it
It appears that the directory / changed. That is because the tar file was added to it. Perhaps you could avoid that error by the following method, or something like it:
Code:
cd /
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/root/dnd *
I'm not sure, you may need to change that to relative paths, like so:
Code:
cd /
tar -cvpzf backup.tar.gz --exclude=backup.tar.gz --exclude=root/dnd *
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/tar: Cowardly refusing to create an empty archive mentalasalto Linux - Software 4 04-08-2013 09:48 AM
Why does "tar" create the path directories to my target in the archive? wh33t Linux - Software 16 10-16-2012 01:52 AM
Change of suffix format on "split" tar archive files scramble64 Linux - Software 2 11-24-2011 05:41 AM
" Warning: This system can not link to static lib archive ... " asdf989 Programming 3 01-28-2010 04:48 PM
KDE "Create New" Menu is EMPTY! mosquito Linux - Software 0 07-29-2003 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration