Changeset 1764 for cpc/trunk/project/bin


Ignore:
Timestamp:
Jan 23, 2011, 2:54:33 PM (10 years ago)
Author:
teymour
Message:

Préparation de la sauvegarde de Solr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/bin/autodump

    r1012 r1764  
    1010# On archive tous les 1er du mois et tous les dimanches
    1111if [[ $(date +%-w) -eq 0 || $(date +%-d) -eq 1 ]]; then
    12   cp $DUMPDIR/$DBNAME.$(date +%y%m%d).sql.gz $DUMPDIR/archives/
     12  cp $DUMPDIR/*.$(date +%y%m%d).s*.gz $DUMPDIR/archives/
    1313fi
    1414
     
    2323  fi
    2424  ym=`printf "%02d%02d" $year0 $month0`
    25   rm -f `ls $DUMPDIR/archives/$DBNAME.${ym}*.sql.gz | grep -v $DBNAME.${ym}01.sql.gz`
     25  rm -f `ls $DUMPDIR/archives/*.${ym}*.s*.gz | grep -v .${ym}01.sql.gz`
    2626fi
    2727
     
    3232  day0=`expr $(date +%d) - 7`
    3333fi
    34 rm -f $DUMPDIR/$DBNAME.*`printf "%02d" $day0`.sql.gz
     34rm -f $DUMPDIR/*.*`printf "%02d" $day0`.s*.gz
    3535if [[ $(date +%-d) -eq 8 ]]; then
    36   rm -f $DUMPDIR/$DBNAME.*29.sql.gz
    37   rm -f $DUMPDIR/$DBNAME.*30.sql.gz
    38   rm -f $DUMPDIR/$DBNAME.*31.sql.gz
     36  rm -f $DUMPDIR/*.*29.s*.gz
     37  rm -f $DUMPDIR/*.*30.s*.gz
     38  rm -f $DUMPDIR/*.*31.s*.gz
    3939fi
    4040
Note: See TracChangeset for help on using the changeset viewer.