Belajar penjadwalan backup database November 10, 2022 Reading time ~1 minute 1. Buat File /home/user/backup.sh isikan seperti dibawah ini: #!/bin/bash TODAY=`date +%d%m%Y` FILE="dump_$TODAY.sql" # Backup database (today) mysqldump -v -h localhost --protocol=TCP -P 3306 -u your_user_db --compress --single-transaction --quick -pYourpassword db_name > /home/user/$FILE sleep 5 # copy file backup awal bulan ke folder /home/user/bulan if [[ $FILE == *"dump_01"* ]]; then mv /home/user/$FILE /home/user/bulan/ fi # hapus file backup 3 hari yang lalu rm /home/user/dump_`date -d "3 day ago" +"%d%m%Y"`* 2. Lalu Simpan 3. Buat Penjadwalan melalui crontab sudo crontab -e isikan : 00 01 * * * /home/user/backup.sh 4. Simpan Penjadwalan backup database akan dilakukan pada jam 1 am Read More Cara Cloning Git Projet Berdasarkan Group ID Cara Cloning Git Projet Berdasarkan Group ID Continue reading Perbandingan Layanan Cloud Modern Saat Ini (Part 1) Published on July 29, 2023 Materi Persiapan Ujian Sertifikasi Oracle Cloud Infrastructure Architect 2023 Professional (1Z0-997-23) Published on July 29, 2023