myftpdumper merge requestshttps://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests2017-05-10T12:02:47Zhttps://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests/1lftp: Use specific key file2017-05-10T12:02:47ZSven Greinerlftp: Use specific key fileFjen UndsoFjen Undsohttps://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests/2Fix deletion on server2018-08-25T18:49:12ZSven GreinerFix deletion on serverPreviously random files were deleted on the ftp remote because the
requested list of files was not sorted. A simple sort by date is enough
in this case because the directories are already named according to the
date.Previously random files were deleted on the ftp remote because the
requested list of files was not sorted. A simple sort by date is enough
in this case because the directories are already named according to the
date.Fjen UndsoFjen Undsohttps://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests/3seperate config from script2018-09-02T19:50:32ZFjen Undsoseperate config from scriptSeperate config makes it easier to update the script.Seperate config makes it easier to update the script.https://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests/4Implement suggestions from shellcheck2021-12-20T21:05:38ZFjen UndsoImplement suggestions from shellcheckScript was run through https://www.shellcheck.net/
Some parts were not quoted or could have unwanted side effects like "rm -r /".
Remaining suggestions can be ignored IMO:
```bash
Line 106:
declare -rg date=$(date +"%Y%m%d-%...Script was run through https://www.shellcheck.net/
Some parts were not quoted or could have unwanted side effects like "rm -r /".
Remaining suggestions can be ignored IMO:
```bash
Line 106:
declare -rg date=$(date +"%Y%m%d-%H%M%S")
^-- SC2155: Declare and assign separately to avoid masking return values.
Line 123:
for dir in $(ls -t1 "$BACKUP_PATH" | tail -n +"$NUMBACKUPS"); do
^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
Line 137:
if [[ $? -ne 0 ]]; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
Line 153:
dbs=$(ls ./*.sql | cut -d "." -f 1 | cut -d "-" -f 1 | sort | uniq)
^-- SC2012: Use find instead of ls to better handle non-alphanumeric filenames.
Line 188:
[[ $? -ne 0 ]] \
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
```Sven GreinerSven Greinerhttps://git.finf.uni-hannover.de/fjen/myftpdumper/-/merge_requests/5fix db name listing for compression if name contains a hyphen.2023-08-31T11:41:24ZFjen Undsofix db name listing for compression if name contains a hyphen.The listing of databases for the tar/compression step does not consider hyphens.
The databases names are cut and might be compressed together with others.The listing of databases for the tar/compression step does not consider hyphens.
The databases names are cut and might be compressed together with others.Sven GreinerSven Greiner