Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System » Bekap MYSQL data

Bekap MYSQL data

#!/bin/bash
tgl=`date "+%d%m%Y"`;
mkdir /home/bekap_data/program/$tgl
sqldir=/home/bekap_data/program/$tgl;
directory=" aplikasi-pajak aplikasi-hutangpiutang aplikasi-sdm web2010 aplikasi-eproc aplikasi-neraca "
for folder in $directory;
do
v_name=$folder"_"$tgl;
tar -zcPf /home/bekap_data/program/$tgl/$v_name.tar /home/$folder/
done
tar -zcPf /home/bekap_data/program/$tgl.tar $sqldir/
rm -R $sqldir/

Filed under: 7. Operating System

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>