Commit c5c35c69 authored by Sven Greiner's avatar Sven Greiner
Browse files

Fix deletion on server

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.
parent 80d544c4
......@@ -260,7 +260,7 @@ upload() {
# FTP: delete old backups
info "Delete old backups on FTP..."
ftpfiles=$(exec_ftp "cd \"$FTP_DIR\"; nlist; exit")
ftpfiles=$(exec_ftp "cd \"$FTP_DIR\"; nlist; exit" | sort)
## filter files starting with a dot
ftpfiles=( $(echo $ftpfiles | sed 's,\.[A-Za-z0-9_\/\.]* , ,g') )
## find old backups
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment