2021-03-31 10:26:43 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
sybase_service() {
|
|
|
|
/etc/init.d/sybase "$1"
|
|
|
|
}
|
|
|
|
|
|
|
|
perform_backup() {
|
|
|
|
zip -r BBDD_"$(date +"%d%m%Y")".zip /opt/sybase
|
2021-04-14 09:34:08 +02:00
|
|
|
scp BBDD_"$(date +"%d%m%Y")".zip -i /root/.ssh/unit coace@192.168.122.1:/vault/backups/databases/sica
|
2021-03-31 10:26:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cleanup() {
|
|
|
|
rm BBDD_"$(date +"%d%m%Y")".zip
|
|
|
|
}
|
|
|
|
|
|
|
|
sybase_service stop
|
|
|
|
perform_backup
|
|
|
|
sybase_service start
|
|
|
|
cleanup
|