julianpoemp / oc-backup Goto Github PK
View Code? Open in Web Editor NEWowncloud / nextcloud backup script for linux servers.
License: MIT License
owncloud / nextcloud backup script for linux servers.
License: MIT License
``In this part of the code (the echo is something I inserted), it appears to be trying to exclude warning errors from mysqldump, but it's indicating that the dump experienced an error.
if [ "${#stderr}" -gt 0 ]; then
echo "mysqldump error: ${stderr}"
if ! [[ "${stderr}" =~ ^mysqldump:[[:space:]]\[Warning\] ]]; then
log "Error: SQL backup failed."
log "_${stderr}_"
errors_found=$((errors_found + 1))
fi
fi
Here is the logging output:
root@conf:/var/www/owncloud# ./oc_backup.sh
* 2023-02-15_14-52-45 | Start oc-backup v1.0.2...
* 2023-02-15_14-52-45 | -> Backup owncloud configuration file...
* 2023-02-15_14-52-45 | -> Read owncloud configuration file...
* 2023-02-15_14-52-45 | -> Enable maintenance mode...
* 2023-02-15_14-52-45 | -> Create backup folder
* 2023-02-15_14-52-45 | -> Create database backup...
* 2023-02-15_14-52-46 | mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump error: mysqldump: [Warning] Using a password on the command line interface can be insecure.
* 2023-02-15_14-52-46 | Error: SQL backup failed.
* 2023-02-15_14-52-46 | _mysqldump: [Warning] Using a password on the command line interface can be insecure._
* 2023-02-15_14-52-46 | -> Create zip archive of owncloud files...
Am I missing something, here?
Hello Julian and thx for you work.
I had a problem with the script. It didnt turn off the maintenance mode.
Is there really the need for escaping?
`enable_maintenance_mode() {
log "-> Enable maintenance mode..."
configFile="${configFile//\'maintenance\' => false/\'maintenance\' => true}"
echo "${configFile}" > "${configPath}"
}
disable_maintenance_mode() {
log "-> Disbale maintenance mode..."
configFile="${configFile//\'maintenance\' => true/\'maintenance\' => false}"
echo "${configFile}" > "${configPath}"
}`
My Installation (Debian on a Raspberry) only works without:
`enable_maintenance_mode() {
log "-> Enable maintenance mode..."
configFile="${configFile//'maintenance' => false/'maintenance' => true}"
echo "${configFile}" > "${configPath}"
}
disable_maintenance_mode() {
log "-> Disbale maintenance mode..."
configFile="${configFile//'maintenance' => true/'maintenance' => false}"
echo "${configFile}" > "${configPath}"
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.