LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2004, 04:15 PM   #1
majestic
LQ Newbie
 
Registered: Mar 2004
Location: Colorado
Posts: 5

Rep: Reputation: 0
How to backup to a tarball


Hi,

What is the best command line to backup all files in all sub directories after a certain date? Tar? gzip?



Cheers
 
Old 08-16-2004, 04:17 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
tar will allow to gzip as you go, and it knows
about a
Code:
       -N, --after-date DATE, --newer DATE
              only store files newer than DATE
too...


Cheers,
Tink
 
Old 08-16-2004, 04:22 PM   #3
majestic
LQ Newbie
 
Registered: Mar 2004
Location: Colorado
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the fast response.. so the command is

tar -N 2004-03-22 -czvf archive.tgz *

Cant seem to make that work.
 
Old 08-16-2004, 04:44 PM   #4
majestic
LQ Newbie
 
Registered: Mar 2004
Location: Colorado
Posts: 5

Original Poster
Rep: Reputation: 0
After seraching around I could only find this command:

tar -zcvf archive.tgz `find . -newer temp.txt -type f -print` // all files after date of temp.txt
 
Old 08-16-2004, 04:47 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
It works for me, try to play with the date's
format... try american ;)

tar -N 15/08/2004 -cvzf backup.tar.gz *


Cheers,
Tink
 
Old 08-16-2004, 04:55 PM   #6
majestic
LQ Newbie
 
Registered: Mar 2004
Location: Colorado
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,

Here's what I get:

[root@kirk ]# ll
total 12
-rwxr--r-- 1 apache apache 1374 Jun 14 21:13 side.sql
-rwxr--r-- 1 apache apache 1151 May 21 08:21 test1.txt
-rwxr--r-- 1 apache apache 50 May 12 16:21 test2.txt
[root@kirk]# tar -N 22/05/2004 -cvzf backup.tar.gz *
tar: side.sql: file is unchanged; not dumped
tar: test1.txt: file is unchanged; not dumped
tar: test2.txt: file is unchanged; not dumped


It produces a file with nothing in it!!

Should produce a file with side.sql only

If I try
tar -N 05/22/2004 -cvzf backup.tar.gz *
side.sql
test1.txt
test2.txt

It backs up everything

Last edited by majestic; 08-16-2004 at 04:57 PM.
 
  


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
Prob's with Tarball Wavz Linux - Software 6 01-22-2007 06:36 AM
After Tarball then what ? sevvy8 Linux - Newbie 2 03-29-2004 03:41 AM
tarball error rooman Linux - Newbie 3 04-15-2003 03:50 AM
Tarball? HardcoreGamer Linux - Software 4 02-12-2003 02:26 PM
Tarball Leftovers frkstein Linux - General 2 04-22-2002 09:38 AM


All times are GMT -5. The time now is 06:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration