Compare commits

...

2 Commits

Author SHA1 Message Date
coolneng 0ec2c73ff9
Implement Sybase database backup script 2021-03-31 10:26:43 +02:00
coolneng e231fd0516
Add CentOS VM SSH key 2021-03-31 10:26:06 +02:00
2 changed files with 20 additions and 0 deletions

View File

@ -81,6 +81,7 @@
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbHBpW1JgArO7XFr3mqMD8nCf3RjkHzso+mpNjR8iZi coolneng@panacea"
"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAstGGn6Ri+LtR6ffPrRgFcLF1fJFRIyz2WrbYMjQRNGdYyr/01TSmh0N2DLapDPhHAiKk7M5qHc9ltSZxWS4zQIkKAVWhyeGbvc/Yya/T8Yy04ltm2XZQEKx92dFhQMBUhDKc/Sp/JQy+jmvzWDL/bt7tmAOzXvVElEaeapvlhaihlwrH1EqTgV44x08MVlOcDJLSEJqCwj1OsD6zT1D58TCc/VawNh9DXJm7MK/1OhesziRFXKR9Wzr0zYcTjYe78ISpILZeilxFA08TQrua51kHIEL/BznXN+IRRIXrhDqQIWkdJTEMIC83//jbOoePvJ7sjrrS2VZwEOg0N+zt+Q== root@sica"
];
};

19
scripts/sybase-backup.sh Normal file
View File

@ -0,0 +1,19 @@
#!/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/sica
}
cleanup() {
rm BBDD_"$(date +"%d%m%Y")".zip
}
sybase_service stop
perform_backup
sybase_service start
cleanup