I regard backup as a very important matter. Because one of the certainties in life is this :
However, with so many computers in our care, we need a way to make it automatic. Otherwise, it will simply take too much time.
Thankfully, this is very easy to do in UNIX / Linux computers.
We have several kind of backup scripts. All of them are quite simple, but essential. Nobody should be without them.
Below you can find a backup script we use to backup MySQL database for our clients. Basically, this is how we use it :
- Modify the script to archive for the time range that we’d like.
The script can archive the backup from 1 week to unlimited. Just remark out the time range that you don’t need (by putting the “#” character in the first column of the particular row). - Make sure we can run mysqldump automatically / with no user intervention.
This can be done easily by creating a file name ~/.my.cnf - Setup the backup to run automatically via cron
- Routinely backup the backup to other servers.
Yes, there is no such thing as “too much backup”.
Without further ado, here is the script : backup-archive-mysql.sh
#!/bin/bash
### Please change the variables below to suit you
targetdir="/home/myuser/mybackup"
targetfile="db-mydb"
targetsuffix=".mysql"
userdb="root"
database="mydb"
#################################
bcp="/bin/cp"
bmysqldump="/usr/bin/mysqldump"
################################## start backup now
### Archive : 1 week
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%A`$targetsuffix
### Archive : 2 weeks
$bcp $targetdir/$targetfile-`date +%A`$targetsuffix $targetdir/$targetfile-last-`date +%A`$targetsuffix
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%A`$targetsuffix
### Archive : 1 month
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%d`$targetsuffix
### Archive : 2 months
$bcp $targetdir/$targetfile-`date +%d`$targetsuffix $targetdir/$targetfile-last-`date +%d`$targetsuffix
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%d`$targetsuffix
### Archive : 1 year
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%m%d`$targetsuffix
### Archive : 2 years
$bcp $targetdir/$targetfile-`date +%m%d`$targetsuffix $targetdir/$targetfile-last-`date +%m%d`$targetsuffix
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%m%d`.mysql
### No Archive
### WARNING: always monitor your free disk space, or the following line may consume them all
$bmysqldump -u $userdb $database > $targetdir/$targetfile-`date +%Y%m%d`$targetsuffix
Here is a sample of ~/.my.cnf; if this file exist, then various MySQL tools & software will be able to run with no intervention.
Of course you’ll need to adjust its user & password :
[client]
user=root
password=mypassword
Hope you’ll find this useful.
I’ll post our other scripts here from time to time as well. Stay tuned.
ini aplikasi untuk sever ya.
makasih infonya.
Very useful indeed, thank you very much… Computers fail to often -.-
makasi gan..
Nice information GAN ๐
kalau boleh request, totorial mysql jg d share donk gan ๐
thx before
info yang menarik. makasih om…
What a coincidence!! i was just searching these type of site. Thank you for sharing.
kurang gan bahasa inggirs nya ane hhe ๐ maaf
nice info gan ๐
the good information,,very creatif and imajinatif,,thanks,,, ๐
thank inforamtion back up this info my sql. thank
Great info, thinks for taking the time to share!
Nice info ๐ pas banget lagi dibutuhin..
trimakasih info
Jarang-jarang nih ada info detail seperti ini. Makasi banget gan, postingan ini sangat berguna.
a href=”http://kolompemuda.com/sepeda-motor-injeksi-irit-harga-terbaik-cuma-honda/”>Sepeda Motor Injeksi Irit Harga Terbaik Cuma Honda
Jarang-jarang nih ada info detail seperti ini. Makasi banget gan, postingan ini sangat berguna.
Sepeda Motor Injeksi Irit Harga Terbaik Cuma Honda
tmks infonya semga bermanfaat
mas, bisa pake bahasa indo lagi gak.. banyak istilah yang gak aku ngerti
Thank infonya gan, ditunggu kunjungan balikny ke blog ane….Harga Blackberry Torch
Terimakasih Infonya
artikel yang bagus,
sangat bermanfaat..
Perkenalkan saya mahasiswa Hukum di UII Yogyakarta ๐
twitter : @profiluii ๐
really like the words she said รขโฌลMy experience in developing strong relationships and leading cross-functional teams to accomplish strategic objectives will serve Carmel well.รขโฌย
agak kesulita dengan bahasanya, pake translater jd bingung
Terimakasih Infonya
artikel yang bagus,
sangat bermanfaat..
thanks for the info. it’s really help me.
Luar biasa..!! setelah melihat-lihat situs anda, saya mendapat pengetahuan baru. Pasti yang punya situs ini bisa dibilang lumayan hebat. Semoga bisa lebih ditingkatkan lagi kedepannya. Biar tambah rame pegunjungnya *_* ( salam dari PlatStainlessSteel )
mas, bisa pake bahasa indo lagi gak?
tmks infonya semga bermanfaat
makasi,,,numpang lewat om
info yg berguna sekali gan, thanks
tips yg bermanfaat sekali, salam kenal
Yes, very true. I realized the importance of back up after my computer stopped functioning a year back. I lost some of my files and all the videos and pictures I had stored. I signed up for an online backup and set it automatically in my computer. So it will backup all my files even if I forget to do so.
What you said is true. Any given time the computers will fail and the article will help them to be prepared and save their hard work.
Backup first…
keren info nya makasih ya
blogwalking gan
terima kasih atas informasi Anda. saya sangat menghargai Anda.
Informasi mereka sangat membantu.
Terima kasih atas info nya , lumayan menarik.
mengerikan..mudah2an saya gak ngalamin kompi gosong begitu ๐
terimakasih gan. postingannya menambah pengetahuan banget..
wow… baru tau cara back up nih.. dari postingan agan..
makasih gan.. bakal sering” kesini dah..
masih perlu banyak belajar tentang My SQL ni q..thanks infonya sob
emang harus kita backup karena swaktu waktu komputer kita akan rusak jadi dengan cara back up kita bisa menyimpan pile pile kita
whh it very nice ,, thanks for informasion ๐
sunggu tingkat atas, haha, makasi gan artikelnya
keren info nya makasih ya
Yang mau buka toko online gak pake ribet, silahkan kunjungi http://onigi.com
thanks’
Siapa yang tidak kenal dengan Clixsense?
Sebuah PTC No Scam yang sangat direkomndasikan.
Saya yakin Anda semua sudah mengetahuinya..
Tapi bagi Anda yang ingin mengetahui lebih jelas apa itu Clixsense?
Atau bagi Anda yang ingin mengetahui lebih dalam mengenai Clixsense..
Silahkan ke http://www.panduanclixsense.blogspot.com/
Sebuah blog sederhana yang semoga bermanfaat
Makasih infonya gan..
terima kasih atas informasi Anda. saya sangat menghargai Anda.
wow, memang backup realtime itu sangat penting untuk menghindari hal-hal yg tidak diinginkan
thanks for the article,,, cool …. hopefully I’ll be able to visit her again to the web,,,,,
sangat membantu sekali, pernah kena hack untung punya backup dan bisa direstore,terima kasih sudah berbagi
I realized the importance of back up after my computer stopped functioning a year back. I lost some of my files and all the videos and pictures I had stored.
Terimakasih atas informasinya ,sangat bermanfaat sekali dan semoga menjadi amal baik bagi anda dan orang lain
Sukses selalu
salam kenal gan
umroh murah
Haji khusus
Umroh 2017
Umroh plus dubai
Umroh Ramadhan 2017
Aida tour
Aida tourindo
Aida tourindo wisata
Umrah
Good day all, thanks for sharing information
pengobatan penyakit vitiligo
Menn getting fuckReall handjob tubesListt of ssex linkedFreee adult mature biSamnmi vapentine nakedInterraial fightPammela andesrson fullly nude
galleryNatural laex pillowsGayy life iin fuerteventuraRussian crimee punishment pornAsian automtive
davijs caEbony erotic storyMall porn videosFuckig sex stories xxxSally hansoln no-heat ggel waxx stripsHomemade milof swallowNatural
nude amatuersKadate philadelphia adultsKimm k seex tape paco porn100 frwe 3d
porn gae siteClear plastic sexy slideIsabella scort dublinStresm seex andd thhe citgy
episodesPornn blkcker for iphoneBlonde girel carrolt vagina pussyLlleyton hewitts visible
peniss linesMaledom assPorn ggay owwn ppee drinkingDropoout rates beccause
off teen pregnancyHow to bredak thee haqbit off masturbationFelix ggay twinkUssed vhss porn moviesBeest boopbs oon tvItalian errotic filmBeachh cca card card hstory inn lonbg poat ppst
vintageGa seex offfender jeefferson countySex videos
off vanesssa hudgesBreast implants chardlotte ncWorrld sex
guide infoFreee cute tteen aass picsGirrl asks to be fucked
harderExercisxes vaginaSeexy flpping fish gifI wont too fuick a guySex galllery of doctorsGodfish sinkling tto bttom oof
tankMemoris of a geishaFunn flaqsh adultLisping exerccises for adultsReducing teen pregnancy splosh kink Young teen blowjob
freeBlachk cock fuckinbg black pyssy moviesHealth care sppa asian massageHairless
ppussies rougfh sexWomedn talkihg about masturbationSperm dolnt shootCute gir iin swiimsuit ggets fuckedFemale bdybuilders giant clitsDo nitrfile glovees contain latexDummb ass mothher fuckersSwiinging 36 dd’sHoww
tto make dick longerSexxy girls and ddad socksShemale 3 wayFuuck arah pallinSummer swingerGirrl masturbate thumbPuussy xxxx puss
assCrotchlesds bikini modelPainfful penetration porn videoBbw whte cockWhat chemicals
strip anodizingNoral vatinal dischargve emedicineSeexy
thong camsAlll americaqn ude gjrl shyowdown freeEmbarresed nude femaleWomen off wal-mart nudePornoo rabit lezbbian homeCanadda
crimminal codee unprotected sexStreet of a thosand pleasuresFarmer’s daughfer sexAiircraft remover klewen stripDelilah cotto sexy photosGayy lesbian fajily calendarSiste ambrose signeed ppicture virginn maryPjjj prettiest lewsbians tubeVintage barbies and accesoriesLaatex hood experiencesLadyy naked 2008 jelsoift entterprises ltdNude sport illustrated swimmsuit
editionHardchore celebriy sexx videosNude malayy womenFort woth ttx gay barsGroup
of trens flashing bathroomHaamster gorgesous granny pornn
tubeBreast canxer suppport networkFantasti porn hentaiG
strijg teensWoodstock pornHardcorre parting and party att brad’sThe naked female bocy picturesRebecca
manns nudeShemale sceamFreee international teen fuck moviesFree lohise delamere sexAnnas ngels
london escortMy boyfriend doesn t want sexMatire overr 70Boy cocks aand sexDoodhwali sexMom daughter nudee beachManuel and pornDrnks own peeRoca ladijes vintage wrizt watchGaay bath ouse directoryNeighbor stripperRaynauds finger
and thyumb numbnessGirrl riding cock tubeDonne mature hard gratisForum
oj simpsn seex tapeBottom lie electronicsExloding assholeBikini girl
breastPamela andersoon brent michaels sexScrew latinoo pussy free
pornXx ssex skaveFtvv skinnny pornSelena gomeez actjal nue videoBaby’s sex from heartbeatMature russian women videoWhyy iss my penis gettung biggerLesbian hentaqi
threesomeAsian sideboardHypno footjobCutve penis sex positionsVaginass de 12 a osOveer
forty swingingBikini forr large bbreasted womanAfrican tribve ccow
vaginaAdult repository and adullt yahoo groupsSex news lawEurope ssex edDinkk and sexFreee nuyde kathy irelandLeftt breast ppain sensationMature dick suckikng lipsHoww where asians treaated in idahoBoys gay free ssex videosEthnic lesbian pornFreee milf
reality por videosBestt 2007 adult filmsHott old sexx
moviesRt paantyhose feet worshipUniversity of colorado nudeChristy hemme bikiniBreast feedkng smoking whileSpeaial teeen pornBb86 bottom bracketColegiaala upskirtsNked oung
teens picturesLarge bbreasts dogy styleExtrem annoe pornAmerican mmodel sexSexy
shor crly hairstylesHott nyde photoos oof girlsIlllustrated seex comics pornBondage femnale free humoliation in kinky
pic superheroesNude perfet thighsFloridra nudse
clubs and campgroundsVintfage erotixa forum inger lynnAmiture nude wpmen oof pornVaginql odolr
aftewr menstruationDehtal dam sex viddeos muffdivedShhow small tit in publiicAlll
anal transvestitesJenna jamsopn free pornFtish storeds inn denver1930s vintage patternMonster cok searchMaan lkcking cuum
frlm pussyTrailers off omen eationg pussyVanessa williams nakedYunbger poren 2Cybersex blogNeww wifry movies sexTeen pink picsBollywood sexy videosMom hasa biig clitSeal heater stripGirlfriend peeingWhhite mam blpack womjan sexPorn picturss oof lil briHow do
yoou strjp coppe froom a pennyAduot elmo face full-zip hoodieInnoceent chwerleaders havkng
sexGirls masturbating teen storyBraad pitt breaast
feedingFucking hhot biker chicksHiggh claqss blowjobArtt decco nude