![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can anyone help with shell script command about searching word with grep command? | aintour | Shell Programming and Scripting | 2 | 10-14-2009 04:51 PM |
| problem with output of find command being input to basename command... | new_learner | UNIX for Dummies Questions & Answers | 2 | 12-14-2008 02:56 AM |
| awk/sed Command : Parse parameter file / send the lines to the ksh export command | rajan_san | Shell Programming and Scripting | 4 | 11-06-2008 01:29 PM |
| assign a command line argument and a unix command to awk variables | sweta_doshi | Shell Programming and Scripting | 0 | 08-08-2008 06:54 AM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 08:12 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Tar Command
Hello All,
I am currently in the process of BACKING UP over 160GB of data, where currently all files have been archived into directories, sub-directories and so fore by day, in the format for example archive/data/2009-11-01 Or archive/data/test/2009-11-01 The issue I’m having, is currently I need to backup by day (or by week), with the TAR command (I'm backing up onto disk via Sun Server), without dumping all the files for a day (or week) into a separate folder – and then backing up. I’ve try using the following command: Tar cv1 */2009-11-0[3-8] //first for week of November Initially thought the wildcard (*) would back up all files in any directory named 2009-11-03 or 2009-11-04 from my current root directory ( ~archive/ ) But this command only back up all files that are a direct sub folder of the currently directory I’m in i.e.: Archive/data/2009-11-03 Or Archive/*/2009-11-04 And does not backup files that are in a further sub-directory (or more down) for example Archive/data/DBA/2009-11-04 Or Archive/*/*/*/2009-11-03 I've played about with scripting, but become stuck and reasoned it should be simpler I believe (???) – does anyone know an alteration or have any ideas to the above command that can help with my objective? |
|
||||
|
Previous I did the find step and created a list but the tar command doesnt work in the same way as copying would for example:
for i in `cat week1`; do cp -p $i /archive/data/backup; done // with week 1 being my list of files found using ' find ' -I can copy of the file to a directory with the same date stamp But I'm unable to do a similar command for tar (keeping the name stamp) - continually getting syntax errors... Sun Microsystems Inc. SunOS 5.9 |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|