I use wget -m
to mirror my webspace to my nas.
So far it's working great, but I noticed that when a file on the server got deleted, it will be still there locally.
Is there any way to delete the local files that aren't existing anymore on the server?
In case of the backup, that won't be a problem, because after wget
I zip the files with a timestamp with tar
.
I found some old forum posts online talking about this missing feature, but those are 15 years old. Is there any possible way to do it now?
If it's not possible, is there a way to delete the directory after it got downloaded and zipped? --delete-after
deletes the files before they got zipped.
Anyway it would be pretty inefficient to download everything every time, but better than having old files around.