@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux www.thesweb.ru 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64
Current Path :
/
var
/
www
/
www-root
/
data
/
backups
/
Path :
Upload File :
New :
File
Dir
/var/www/www-root/data/backups/backup_db.sh
#!/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin PGPASSWORD=y3mvy2kwC1 export PGPASSWORD pathDB=/var/www/www-root/data/backups/pgsql/ dbHost=localhost dbUser=postgres #find $pathDB \( -name "*-1[^5].*" -o -name "*-[023]?.*" \) -ctime +7 -delete find $pathDB \( -name "*-15-*" \) -mtime +7 -delete pg_dump --exclude-table-data=trees --exclude-table-data=revry --exclude-table-data=rrdepend --username=$dbUser --host=$dbHost -w --schema=public SEC_THES_20211023 | gzip > $pathDB/SEC_THES_20211023_$(date "+%Y-%m-%d-%H").sql.gz pg_dump --exclude-table-data=trees --exclude-table-data=revry --exclude-table-data=rrdepend --username=$dbUser --host=$dbHost -w --schema=public SCI_THES_20201121 | gzip > $pathDB/SCI_THES_20201121_$(date "+%Y-%m-%d-%H").sql.gz pg_dump --exclude-table-data=trees --exclude-table-data=revry --exclude-table-data=rrdepend --username=$dbUser --host=$dbHost -w --schema=public LII_THES_20211023 | gzip > $pathDB/LII_THES_20211023_$(date "+%Y-%m-%d-%H").sql.gz unset PGPASSWORD