Loading ...
Sorry, an error occurred while loading the content.

Re: [TwinCLinG] query regading backup

Expand Messages
  • Cheedhu
    ... From: PAL VISHAL To: Linux Group Hyderabad Sent: Thursday, 17 May, 2007 9:23:57 PM Subject: [TwinCLinG]
    Message 1 of 1 , May 17, 2007
    • 0 Attachment
      ----- Original Message ----

      From: PAL VISHAL <palvishal@...>

      To: Linux Group Hyderabad <ilughyd@yahoogroups.com>

      Sent: Thursday, 17 May, 2007 9:23:57 PM

      Subject: [TwinCLinG] query regading backup


      I have a query, actually at my office server (RHEL 4) there are 3 different folder for e.g

      marketing

      account

      export

      (each with inside more than 20 folder, Sub folder & several files )


      The folder name is depend on there department & people from respective group were working on that folder from last 1 year. All I want is to keep latest six month file on hard drive (Due to space problem) and move the six month old files to other hard drive .

      Is there any command which will search all files from all folder & sub folder backup it to the other hard drive and at last delete it. The backup should follow the same folder structure as the orignial one to store the backed up files.


      Please suggest


      Thanks


      VP



      ----- Reply Message ----


      one good option to write a script for this to do the following

      1. Find all the files older than 6 months (man find for correct options) , store the list into another file
      2. cat the list of files and tar them (tar can to preserve the directory structure and permissions, check man pages)
      3. move the tar to another location
      4. cat the list and then delete the files

      use the man pages for exact commands and options
      WARNING : Test the script before you run it on the actual files or you are at risk losing the files!

      - Cheedhu





      __________________________________________________________
      Yahoo! India Answers: Share what you know. Learn something new
      http://in.answers.yahoo.com/

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.