Compare commits

...

3 Commits

16 changed files with 11948 additions and 0 deletions

3
.gitignore vendored
View File

@@ -21,3 +21,6 @@ coverage.xml
# Project specific
routing-lokal.rsc
bgp_sync.log
# Backup folder - do not commit
myBackup/

5
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"kilocode.kilo-code"
]
}

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"remote.autoForwardPortsFallback": 0
}

43
failed_ppp_users.csv Normal file
View File

@@ -0,0 +1,43 @@
Username,Status
1500020,Authentication Failed
81100008,Authentication Failed
81100009,Authentication Failed
81500005,Authentication Failed
81700004,Authentication Failed
81700006,Authentication Failed
81700007,Authentication Failed
81800010,Authentication Failed
81900003,Authentication Failed
81900004,Authentication Failed
82000030,Authentication Failed
82000031,Authentication Failed
82000036,Authentication Failed
82000037,Authentication Failed
82000038,Authentication Failed
82000039,Authentication Failed
82000040,Authentication Failed
82000041,Authentication Failed
8200006,Authentication Failed
8200007,Authentication Failed
8200008,Authentication Failed
8200010,Authentication Failed
8200011,Authentication Failed
82100002,Authentication Failed
82400002,Authentication Failed
82500006,Authentication Failed
82700002,Authentication Failed
8300004,Authentication Failed
83300002,Authentication Failed
83300003,Authentication Failed
83500002,Authentication Failed
83500003,Authentication Failed
8400002,Authentication Failed
84100002,Authentication Failed
84100003,Authentication Failed
8500004,Authentication Failed
8500008,Authentication Failed
8700002,Authentication Failed
demangputrakbl,Authentication Failed
jayenmecutan,Authentication Failed
mologkos@sanga,Authentication Failed
purnamaningsih-tebuana,Authentication Failed
1 Username Status
2 1500020 Authentication Failed
3 81100008 Authentication Failed
4 81100009 Authentication Failed
5 81500005 Authentication Failed
6 81700004 Authentication Failed
7 81700006 Authentication Failed
8 81700007 Authentication Failed
9 81800010 Authentication Failed
10 81900003 Authentication Failed
11 81900004 Authentication Failed
12 82000030 Authentication Failed
13 82000031 Authentication Failed
14 82000036 Authentication Failed
15 82000037 Authentication Failed
16 82000038 Authentication Failed
17 82000039 Authentication Failed
18 82000040 Authentication Failed
19 82000041 Authentication Failed
20 8200006 Authentication Failed
21 8200007 Authentication Failed
22 8200008 Authentication Failed
23 8200010 Authentication Failed
24 8200011 Authentication Failed
25 82100002 Authentication Failed
26 82400002 Authentication Failed
27 82500006 Authentication Failed
28 82700002 Authentication Failed
29 8300004 Authentication Failed
30 83300002 Authentication Failed
31 83300003 Authentication Failed
32 83500002 Authentication Failed
33 83500003 Authentication Failed
34 8400002 Authentication Failed
35 84100002 Authentication Failed
36 84100003 Authentication Failed
37 8500004 Authentication Failed
38 8500008 Authentication Failed
39 8700002 Authentication Failed
40 demangputrakbl Authentication Failed
41 jayenmecutan Authentication Failed
42 mologkos@sanga Authentication Failed
43 purnamaningsih-tebuana Authentication Failed

43
failed_ppp_users.xls Normal file
View File

@@ -0,0 +1,43 @@
Username Status
1500020 Authentication Failed
81100008 Authentication Failed
81100009 Authentication Failed
81500005 Authentication Failed
81700004 Authentication Failed
81700006 Authentication Failed
81700007 Authentication Failed
81800010 Authentication Failed
81900003 Authentication Failed
81900004 Authentication Failed
82000030 Authentication Failed
82000031 Authentication Failed
82000036 Authentication Failed
82000037 Authentication Failed
82000038 Authentication Failed
82000039 Authentication Failed
82000040 Authentication Failed
82000041 Authentication Failed
8200006 Authentication Failed
8200007 Authentication Failed
8200008 Authentication Failed
8200010 Authentication Failed
8200011 Authentication Failed
82100002 Authentication Failed
82400002 Authentication Failed
82500006 Authentication Failed
82700002 Authentication Failed
8300004 Authentication Failed
83300002 Authentication Failed
83300003 Authentication Failed
83500002 Authentication Failed
83500003 Authentication Failed
8400002 Authentication Failed
84100002 Authentication Failed
84100003 Authentication Failed
8500004 Authentication Failed
8500008 Authentication Failed
8700002 Authentication Failed
demangputrakbl Authentication Failed
jayenmecutan Authentication Failed
mologkos@sanga Authentication Failed
purnamaningsih-tebuana Authentication Failed

BIN
ktp.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

38
pp-user.csv Normal file
View File

@@ -0,0 +1,38 @@
Username password profile
1500020 sriyani060325 star_30
81100008 sukanta230126 star_30
81100009 andika090226 star_30
81500005 ana050226 star_30
81700004 nopayana130126 star_30
81700006 yuni260126 star_30
81700007 sri270126 star_30
81800010 diana060126 star_30
81900003 rismayani050226 star_30
81900004 sukarna190226 star_30
82000030 nandika290126 star_30
82000031 suarmini310126 star_30
82000036 suarjana160226 star_30
82000037 suprapta190226 star_30
82000038 sucika210226 star_30
82000039 satria250226 star_30
82000040 yudi270226 star_30
82000041 hendra270226 star_30
8200006 wikandana090126 star_30
8200008 kariasa020226 star_30
8200011 tandeg210226 star_30
82100002 priska190126 star_30
82400002 risma200226 star_30
8300004 wirawan301225 star_30
83300002 sudarsa250226 star_30
83300003 edi020326 star_30
83500002 rusni290126 star_30
84100002 devi070226 star_30
84100003 merta280226 star_30
8500008 diah170226 star_10
8700002 handayani230126 star_30
1 Username password profile
2 1500020 sriyani060325 star_30
3 81100008 sukanta230126 star_30
4 81100009 andika090226 star_30
5 81500005 ana050226 star_30
6 81700004 nopayana130126 star_30
7 81700006 yuni260126 star_30
8 81700007 sri270126 star_30
9 81800010 diana060126 star_30
10 81900003 rismayani050226 star_30
11 81900004 sukarna190226 star_30
12 82000030 nandika290126 star_30
13 82000031 suarmini310126 star_30
14 82000036 suarjana160226 star_30
15 82000037 suprapta190226 star_30
16 82000038 sucika210226 star_30
17 82000039 satria250226 star_30
18 82000040 yudi270226 star_30
19 82000041 hendra270226 star_30
20 8200006 wikandana090126 star_30
21
22 8200008 kariasa020226 star_30
23
24 8200011 tandeg210226 star_30
25 82100002 priska190126 star_30
26 82400002 risma200226 star_30
27
28
29 8300004 wirawan301225 star_30
30 83300002 sudarsa250226 star_30
31 83300003 edi020326 star_30
32 83500002 rusni290126 star_30
33
34
35 84100002 devi070226 star_30
36 84100003 merta280226 star_30
37 8500008 diah170226 star_10
38 8700002 handayani230126 star_30

1980
ppp178.rsc Normal file

File diff suppressed because it is too large Load Diff

1987
ppp66.rsc Normal file

File diff suppressed because it is too large Load Diff

16
ppp_profile_diffs.csv Normal file
View File

@@ -0,0 +1,16 @@
Username,Profile Router 66,Profile Router 178
1600004,star_20,EXPIRED
1700023,star_10,EXPIRED
1800005,EXPIRED,hemat
221128130296,bali_10,EXPIRED
2500011,star_20,EXPIRED
2600001,EXPIRED,hemat
500014,star_10,hemat
81100008,star_30,star_50
devaglp,star_20,star_30
edo,free1,hemat
jayenmecutan,free2,hemat
ksuglp,vpn,star_10
pkbalikspd,free1,hemat
smctest,star_20,star_30
sukarma,free1,hemat
1 Username Profile Router 66 Profile Router 178
2 1600004 star_20 EXPIRED
3 1700023 star_10 EXPIRED
4 1800005 EXPIRED hemat
5 221128130296 bali_10 EXPIRED
6 2500011 star_20 EXPIRED
7 2600001 EXPIRED hemat
8 500014 star_10 hemat
9 81100008 star_30 star_50
10 devaglp star_20 star_30
11 edo free1 hemat
12 jayenmecutan free2 hemat
13 ksuglp vpn star_10
14 pkbalikspd free1 hemat
15 smctest star_20 star_30
16 sukarma free1 hemat

30
pull_backup.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# Script to pull backup from Gitea Server
# Run inside Alpine container
# Configuration
REMOTE_USER="wartana"
REMOTE_HOST="103.138.63.186"
REMOTE_DIR="/home/wartana/myApp/iix/myBackup/"
LOCAL_DIR="/data/myBackup"
SSH_KEY="/mikrotik.key"
echo "[$(date)] Starting backup pull..."
# Ensure key has correct permissions
chmod 600 "$SSH_KEY"
# Run Rsync
# -a: archive mode
# -v: verbose
# -z: compress
# --delete: mirror (delete local files if gone from remote)
# -e: ssh with specific key and ignoring known_hosts (optional for automation)
rsync -avz --delete -e "ssh -i $SSH_KEY -o StrictHostKeyChecking=no -p 22" \
"$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR" "$LOCAL_DIR/"
echo "[$(date)] Backup pull completed."
# Local structure will be:
# /data/myBackup/Mikrotik/
# /data/myBackup/Billing/
# /data/myBackup/Server/

1
rencana.txt Normal file
View File

@@ -0,0 +1 @@
buat jadwal backup di mikrotik setiap jam 2 pagi, binari dan rsc file. kirim ke ftp server

7699
router-dimensi-ccr2216.rsc Normal file

File diff suppressed because it is too large Load Diff

11
sync_gdrive.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Sync local mikrotik backups to Google Drive
# Runs daily to keep the cloud copies updated
BACKUP_DIR="/home/wartana/myApp/iix/myBackup/Mikrotik"
REMOTE_DIR="gdrive:myBackup/Mikrotik"
LOG_FILE="/home/wartana/myApp/iix/gdrive_sync.log"
echo "[$(date)] Starting rclone sync to Google Drive..." >> $LOG_FILE
/usr/bin/rclone sync "$BACKUP_DIR" "$REMOTE_DIR" --log-file="$LOG_FILE" --log-level INFO
echo "[$(date)] Sync complete." >> $LOG_FILE

0
testftp Normal file
View File

89
unified_backup_sync.sh Executable file
View File

@@ -0,0 +1,89 @@
#!/bin/bash
# Backup Script for MySQL Billing Database & MikroTik Google Drive Sync
# Author: Antigravity Agent
# Date: 2026-03-13
set -e
BACKUP_BILLING_DIR="/home/wartana/myApp/iix/myBackup/Billing"
BACKUP_MIKROTIK_DIR="/home/wartana/myApp/iix/myBackup/Mikrotik"
BACKUP_SERVER_DIR="/home/wartana/myApp/iix/myBackup/Server"
DATE=$(date +%F_%H-%M-%S)
RCLONE_REMOTE_BILLING="gdrive:myBackup/Billing"
RCLONE_REMOTE_MIKROTIK="gdrive:myBackup/Mikrotik"
RCLONE_REMOTE_SERVER="gdrive:myBackup/Server"
RCLONE_CONFIG="/home/wartana/.config/rclone/rclone.conf"
LOG_FILE="/var/log/billing_mikrotik_backup.log"
MYSQL_HOST="103.138.63.188"
MYSQL_USER="chatbot"
MYSQL_PASS="afSXzFn_tLlve(@H"
MYSQL_DB="billinggold"
mkdir -p "$BACKUP_BILLING_DIR"
mkdir -p "$BACKUP_MIKROTIK_DIR"
mkdir -p "$BACKUP_SERVER_DIR"
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | sudo tee -a "$LOG_FILE"
}
log "=========================================================="
log "Starting Database Backup & Cloud Sync process..."
# 1. Billing Database Backup
log "Creating MySQL dump for $MYSQL_DB from $MYSQL_HOST..."
DUMP_FILE="$BACKUP_BILLING_DIR/billinggold-$DATE.sql.gz"
mysqldump -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASS" --single-transaction "$MYSQL_DB" | gzip > "$DUMP_FILE"
log "Database dump saved to $DUMP_FILE"
# 2. Upload Billing to Google Drive (myBackup/Billing)
log "Uploading Billing Backup to Google Drive (myBackup/Billing)..."
if rclone --config "$RCLONE_CONFIG" copy "$BACKUP_BILLING_DIR" "$RCLONE_REMOTE_BILLING" --transfers=4 --checkers=8; then
log "Upload for Billing Database successful."
else
log "ERROR: Upload for Billing Database failed."
fi
# 3. Upload MikroTik to Google Drive (myBackup/Mikrotik)
# Compress any new (uncompressed) .backup and .rsc files to save space
log "Compressing new MikroTik backup files..."
find "$BACKUP_MIKROTIK_DIR" -type f \( -name "*.backup" -o -name "*.rsc" \) ! -name "*.gz" -exec gzip -f {} \;
log "Compression done."
log "Applying read permissions to MikroTik backups for upload..."
sudo chmod 644 "$BACKUP_MIKROTIK_DIR"/*.gz 2>/dev/null || log "Warning: Could not change permissions for MikroTik backups."
log "Uploading MikroTik Backup to Google Drive (myBackup/Mikrotik)..."
if rclone --config "$RCLONE_CONFIG" copy "$BACKUP_MIKROTIK_DIR" "$RCLONE_REMOTE_MIKROTIK" --transfers=4 --checkers=8; then
log "Upload for MikroTik Backup successful."
else
log "ERROR: Upload for MikroTik Backup failed."
fi
# 4. Upload Server Backups to Google Drive (myBackup/Server)
if [ "$(ls -A "$BACKUP_SERVER_DIR" 2>/dev/null)" ]; then
log "Uploading Server Backup to Google Drive (myBackup/Server)..."
if rclone --config "$RCLONE_CONFIG" copy "$BACKUP_SERVER_DIR" "$RCLONE_REMOTE_SERVER" --transfers=4 --checkers=8; then
log "Upload for Server Backup successful."
else
log "ERROR: Upload for Server Backup failed."
fi
else
log "No server backups found, skipping server upload."
fi
# 5. Cleanup old cloud backups (keep last 30 days)
log "Cleaning up old cloud backups (older than 30 days)..."
rclone --config "$RCLONE_CONFIG" delete "$RCLONE_REMOTE_BILLING" --min-age 30d || log "Warning: Cloud cleanup for Billing failed."
rclone --config "$RCLONE_CONFIG" delete "$RCLONE_REMOTE_MIKROTIK" --min-age 30d || log "Warning: Cloud cleanup for MikroTik failed."
rclone --config "$RCLONE_CONFIG" delete "$RCLONE_REMOTE_SERVER" --min-age 30d || log "Warning: Cloud cleanup for Server failed."
# 6. Cleanup old local backups (keep last 30 days)
log "Cleaning up old local backups (older than 30 days)..."
find "$BACKUP_BILLING_DIR" -type f -mtime +30 -delete
find "$BACKUP_MIKROTIK_DIR" -type f -mtime +30 -delete
find "$BACKUP_SERVER_DIR" -type f -mtime +30 -delete
log "All Backup processes completed."
log "=========================================================="