Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    Question Unanswered: backup to tape based on date-time

    hello all ,

    could anyone help me with the following backup :

    i need to do a backup on tape based on date-time .

    i have 2 directories that i need to backup them to a tape but i need to do that for the directories that have the latest date .

    how to do that ?

    i want to put it in a script .
    Best Regards
    Last edited by alfrednone; 05-17-07 at 02:20.

  2. #2
    Join Date
    Aug 2006
    The Netherlands

    It's not so clear to me which directories you want to test for age but you could do something with the find command and it's output piped to the tar command. Something like this:
    if [ `find . -type d -newer dir2 -name dir1 | wc -l` -ne 0 ]; then  
        find dir1 -print | tar -cf /dev/tape                                               
    elif [ `find . -type d -newer dir1 -name dir2 | wc -l` -ne 0 ]; then
        find dir2 -print | tar -cf /dev/tape                                              

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts