20 lines
310 B
Bash
20 lines
310 B
Bash
#!/bin/sh
|
|
|
|
sybase_service() {
|
|
/etc/init.d/sybase "$1"
|
|
}
|
|
|
|
perform_backup() {
|
|
zip -r BBDD_"$(date +"%d%m%Y")".zip /opt/sybase
|
|
scp BBDD_"$(date +"%d%m%Y")".zip unit:/vault/backups/databases/sica
|
|
}
|
|
|
|
cleanup() {
|
|
rm BBDD_"$(date +"%d%m%Y")".zip
|
|
}
|
|
|
|
sybase_service stop
|
|
perform_backup
|
|
sybase_service start
|
|
cleanup
|