Changeset 1765 for cpc/trunk/project/bin


Ignore:
Timestamp:
Jan 23, 2011, 3:20:21 PM (10 years ago)
Author:
teymour
Message:

Ajout de la sauvegarde de Solr

File:
1 edited

Legend:

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

    r1764 r1765  
    77
    88mysqldump $MYSQLID $DBNAME -q --single-transaction --add-drop-table -R -t --disable-keys --complete-insert | gzip > $DUMPDIR/$DBNAME.$(date +%y%m%d).sql.gz
     9if test -n $SOLR_DATA_PATH ; then
     10        tar zcvf $DUMPDIR/$DBNAME.$(date +%y%m%d).solr.tar.gz $SOLR_DATA_PATH
     11fi
    912
    1013# On archive tous les 1er du mois et tous les dimanches
    1114if [[ $(date +%-w) -eq 0 || $(date +%-d) -eq 1 ]]; then
    12   cp $DUMPDIR/*.$(date +%y%m%d).s*.gz $DUMPDIR/archives/
     15  cp $DUMPDIR/$DBNAME.$(date +%y%m%d).s*.gz $DUMPDIR/archives/
    1316fi
    1417
     
    2326  fi
    2427  ym=`printf "%02d%02d" $year0 $month0`
    25   rm -f `ls $DUMPDIR/archives/*.${ym}*.s*.gz | grep -v .${ym}01.sql.gz`
     28  rm -f `ls $DUMPDIR/archives/$DBNAME.${ym}*.s*.gz | grep -v .${ym}01.sql.gz`
    2629fi
    2730
     
    3235  day0=`expr $(date +%d) - 7`
    3336fi
    34 rm -f $DUMPDIR/*.*`printf "%02d" $day0`.s*.gz
     37rm -f $DUMPDIR/$DBNAME.*`printf "%02d" $day0`.s*.gz
    3538if [[ $(date +%-d) -eq 8 ]]; then
    36   rm -f $DUMPDIR/*.*29.s*.gz
    37   rm -f $DUMPDIR/*.*30.s*.gz
    38   rm -f $DUMPDIR/*.*31.s*.gz
     39  rm -f $DUMPDIR/$DBNAME.*29.s*.gz
     40  rm -f $DUMPDIR/$DBNAME.*30.s*.gz
     41  rm -f $DUMPDIR/$DBNAME.*31.s*.gz
    3942fi
    4043
Note: See TracChangeset for help on using the changeset viewer.