Quote:
It's probably slow because: 1) Littleboy is a very low spec machine. 2) The copy was done partly over wifi. I've tried to do it entirely via ethernet, but even when I used the address of the ethernet card on the laptop, it still used wifi for the transfer. Most of today's update was the Mozilla cache, which imho is not worth copying. I must see if I can exclude that. Quote:
|
I've revisited this one today. I think there is an approach which gives a week's worth of backups, while automatically allowing for missed days such as weekends or holidays. The date of the previous successful backup is recorded in the file system by touching the one directory and that date is later retrieved using stat with date via the UNIX epoch.
Code:
... The set -e is just a quick hack, there are probably more appropriate ways using the $? variable to deal with tracking whether the backup was successful and the directory's date refreshed. If a year's worth of backups are needed then %j can be used instead of %u in the date calculation. Or else use %d for a month's worth of backups. |
All times are GMT -5. The time now is 02:56 PM. |