#yeni yil dosyasi yoksa, olustur if [ ! -d /storage/backup/erpist/`date +%Y` ]; then mkdir /storage/backup/erpist/`date +%Y` #dosyay postgres kullanicisi icin izin ver chown postgres:postgres /storage/backup/erpist/`date +%Y` fi
echo "------------------------------------------------------------" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log echo "`date`: CLUSTER SCHEMA-ONLY BACKUP process has STARTED" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log echo "------------------------------------------------------------" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log # Schema verildiginde data yedeklemesi yapmiyor. --schema-only gibi calisiyor. pg_dump -U postgres erp --schema-only -Fc --compress=9 > /storage/backup/erpist/$Year/erpist-$Year$Month$Day'-schema.dmp' echo "---------------------------------------------------------" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log echo "`date`: CLUSTER SCHEMA-ONLY BACKUP process has ENDED" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log echo "---------------------------------------------------------" >> /var/www/log/ERP-Full-Dump-Data-Backup-$Year-$Month-$Day.log