Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-25-2013, 08:23 AM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › PHP v
« Previous 1 ... 16 17 18 19 20 ... 31 Next »

[Solved] Cara backup database auto di hosting

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Solved Cara backup database auto di hosting
03-20-2012, 08:44 AM
Post: #1
ngalamcity Offline
./Devilz 1st Cadet
Posts: 25
Joined: Mar 2012
Reputation: 4
Rainbow Cara backup database auto di hosting
Gan tolong dunk yang taw cara backup otomatis di hosting.. dari tadi gue nyari g ad yang bener.. nyarinya ap kluarnya ap suram

Pliiss Butuh banget gan... mewek belajar
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2012, 10:06 AM
Post: #2
Joris Offline
./Devilz Officer
Posts: 240
Joined: Feb 2011
Reputation: 3
RE: Cara backup database auto di hosting
(03-20-2012 08:44 AM)ngalamcity Wrote:  Gan tolong dunk yang taw cara backup otomatis di hosting.. dari tadi gue nyari g ad yang bener.. nyarinya ap kluarnya ap suram

Pliiss Butuh banget gan... mewek belajar

Kalao mau backup database secara berkala pake cron job aja...
Bisa ditentukan mau dibackup kapan aja.
Find all posts by this user
Quote this message in a reply
 Reputed by :  tabun(+1)
03-20-2012, 10:17 AM
Post: #3
ngalamcity Offline
./Devilz 1st Cadet
Posts: 25
Joined: Mar 2012
Reputation: 4
RE: Cara backup database auto di hosting
(03-20-2012 10:06 AM)Joris Wrote:  
(03-20-2012 08:44 AM)ngalamcity Wrote:  Gan tolong dunk yang taw cara backup otomatis di hosting.. dari tadi gue nyari g ad yang bener.. nyarinya ap kluarnya ap suram

Pliiss Butuh banget gan... mewek belajar

Kalao mau backup database secara berkala pake cron job aja...
Bisa ditentukan mau dibackup kapan aja.

ketawa Nice gan.. udah bs wawa dugem

Thanks AGAN .. mewek mantap
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2012, 10:26 AM
Post: #4
Joris Offline
./Devilz Officer
Posts: 240
Joined: Feb 2011
Reputation: 3
RE: Cara backup database auto di hosting
(03-20-2012 10:17 AM)ngalamcity Wrote:  
(03-20-2012 10:06 AM)Joris Wrote:  
(03-20-2012 08:44 AM)ngalamcity Wrote:  Gan tolong dunk yang taw cara backup otomatis di hosting.. dari tadi gue nyari g ad yang bener.. nyarinya ap kluarnya ap suram

Pliiss Butuh banget gan... mewek belajar

Kalao mau backup database secara berkala pake cron job aja...
Bisa ditentukan mau dibackup kapan aja.

ketawa Nice gan.. udah bs wawa dugem

Thanks AGAN .. mewek mantap

sama2 bro.......mantap
Find all posts by this user
Quote this message in a reply
03-20-2012, 10:43 AM (This post was last modified: 03-20-2012 10:44 AM by ngalamcity.)
Post: #5
ngalamcity Offline
./Devilz 1st Cadet
Posts: 25
Joined: Mar 2012
Reputation: 4
RE: Cara backup database auto di hosting
buat temen2 yang lom taw nh Ane pke script nya..
php(bak.php) :
PHP Code:
<?php  
$dbUser 
= "...";
$dbPass = "...";
$dbName = "...";
$dbHost = "localhost";
   
$backupfile = $dbName . date("Y-m-d-H-i-s") . '.sql';
exec("mysqldump -h $dbHost -u $dbUser -p$dbPass $dbName > $backupfile");
      
?>


settingan d cron jobnya :

Code:
0    0    *    *    0    php -q /home/user_akun/public_html/bak.php

*note nh bakup per minggu seneng banggapinter
Visit this user's website Find all posts by this user
Quote this message in a reply
 Reputed by :  Reborn Of Code(+1) , Regel(+1)
03-20-2012, 11:52 AM
Post: #6
dzawa Offline
./Devilz Commander
Posts: 281
Joined: Feb 2012
Reputation: 5
RE: Cara backup database auto di hosting
mantap gan, thx hee.. Mw tak test dulu... Hehe, lumayan.. mantap
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2012, 02:34 PM
Post: #7
ngalamcity Offline
./Devilz 1st Cadet
Posts: 25
Joined: Mar 2012
Reputation: 4
RE: Cara backup database auto di hosting
(03-20-2012 11:52 AM)dzawa Wrote:  mantap gan, thx hee.. Mw tak test dulu... Hehe, lumayan.. mantap
Yups sama2 pasrahsenampagiterharu
Visit this user's website Find all posts by this user
Quote this message in a reply
03-20-2012, 08:18 PM
Post: #8
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: Cara backup database auto di hosting
mantap

Nih ane buat simple bash script buat backup all db ama www directory.. Sapa tau berguna.. ngacir

Code:
#!/bin/sh
#simple backup script

THEDATE=`date +%d%m%y%H%M`

#backup database dan webdir
mysqldump -u root -password_ente -A | gzip -9 > /path/to/backup/dir/sql/backupnew.sql.gz
tar -pczf /path/to/backup/dir/web/backupnew.tar.gz /path/to/www/dir

# hapus backupan lama
find /path/to/backup/dir/sql/cron_* -exec rm {} \;
find /path/to/backup/dir/web/cron_* -exec rm {} \;

#rename file backupan baru
mv /path/to/backup/dir/sql/backupnew.sql.gz /path/to/backup/dir/sql/cron_backupalldb_$THEDATE.sql.gz
mv /path/to/backup/dir/web/backupnew.tar.gz  /path/to/backup/dir/web/cron_webbackup_$THEDATE.tar.gz
Find all posts by this user
Quote this message in a reply
 Reputed by :  fuxnbums(+1)
03-21-2012, 11:32 AM (This post was last modified: 03-21-2012 11:33 AM by ngalamcity.)
Post: #9
ngalamcity Offline
./Devilz 1st Cadet
Posts: 25
Joined: Mar 2012
Reputation: 4
RE: Cara backup database auto di hosting
(03-20-2012 08:18 PM)ditatompel Wrote:  mantap

Nih ane buat simple bash script buat backup all db ama www directory.. Sapa tau berguna.. ngacir

Code:
#!/bin/sh
#simple backup script

THEDATE=`date +%d%m%y%H%M`

#backup database dan webdir
mysqldump -u root -password_ente -A | gzip -9 > /path/to/backup/dir/sql/backupnew.sql.gz
tar -pczf /path/to/backup/dir/web/backupnew.tar.gz /path/to/www/dir

# hapus backupan lama
find /path/to/backup/dir/sql/cron_* -exec rm {} \;
find /path/to/backup/dir/web/cron_* -exec rm {} \;

#rename file backupan baru
mv /path/to/backup/dir/sql/backupnew.sql.gz /path/to/backup/dir/sql/cron_backupalldb_$THEDATE.sql.gz
mv /path/to/backup/dir/web/backupnew.tar.gz  /path/to/backup/dir/web/cron_webbackup_$THEDATE.tar.gz

Yuhuuu.. thanks y Gan.. terharumantap
Visit this user's website Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] Auto Login Forum dengan CURL angelcyber942 16 271 Yesterday 02:06 PM
Last Post: gookilers
Sad [Ask] cara buat balesan komentar berita di php superrmario 10 183 05-21-2013 01:53 AM
Last Post: ZenZ
  [Ask] cara membuat data mining pada php? Keonx 2 87 05-19-2013 06:12 PM
Last Post: Keonx
  [Solved] Tentang Cara Search Di Php wildan123456 4 107 05-15-2013 09:26 PM
Last Post: kidofdream
  [Ask] Ada Gk script auto unfollow all following? wildan123456 12 148 05-14-2013 12:58 PM
Last Post: Coziboy
  [Ask] Cara Decrypt Shell (dg Gambar) sayacupu 7 160 05-07-2013 07:52 PM
Last Post: googles
  portal situs berita tanpa database wenkhairu 30 2,205 05-07-2013 06:25 PM
Last Post: easybie
  [Solved] Cara Bikin Thumbnail Gambar Menggunakan PHP CodeSearcher 4 138 05-02-2013 04:47 PM
Last Post: CodeSearcher
  Bagaimana cara Login dengan menggunaka Privilage dauf 2 85 04-24-2013 11:44 AM
Last Post: dauf
  [KASKUS]Bot Add Friend,Auto Post,Auto VM,Auto PM Down 24 2,056 04-14-2013 04:29 AM
Last Post: saporn

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-25-2013, 08:23 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE