LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-10-2005, 07:43 PM   #1
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Rep: Reputation: 15
backup files, tar, do i need to make a copy


hi all

as it says in the title
when i archive a file, should i make a copy of the file, then tar and gzip the copy
or can i just tar and gzip the original file

what i am trying to do is backup my web server, eg. httpdocs
eg. tar -cf httpdocs_date.tar /httpdocs
gzip -9 httpdocs_date.tar

or

cp /httpdocs /httpdocs_date
tar -cf httpdocs_date.tar /httpdocs_date
gzip -9 httpdocs_date.tar

with speed, impact on web site, restoration, and data integrity as the key points

would it just be best to shutdown the server while this is being done?

the directory i'm guessing will be massive, several gigs at least

thanks
dave
 
Old 05-10-2005, 08:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
If httpdocs is static (not files written to it by client-sessions)
the tar-ing of the actual thing should be just fine. If you
have the content modified even a copy wouldn't prevent
broken files necessarily - you'd have to stop the service(s),
make your copy and restart them.


Cheers,
Tink
 
Old 05-10-2005, 08:42 PM   #3
dtra
Member
 
Registered: Nov 2004
Distribution: fc4
Posts: 104

Original Poster
Rep: Reputation: 15
hey thanks for your reply
so if i stopped the service would i still need to make a copy to tar?
 
Old 05-10-2005, 08:52 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Nope - the only "problem" is that a tar with bz2
compression would make for a longer downtime
than a copy. If you tar, restart the service, and
THEN compress you should be sweet :}


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using tar, to make differential Backup on Hard Disk alpha97 Linux - Newbie 3 05-14-2007 04:24 PM
permissions on tar backup files durden2.0 Linux - Newbie 4 08-03-2004 11:50 PM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 07:04 AM
how do i make .tar.gz files? ShawnD Linux - General 5 07-24-2002 04:51 AM
backup/verify files with tar hokri Linux - General 0 11-27-2001 06:05 AM


All times are GMT -5. The time now is 05:56 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration