Should skip over files that are inaccessible
While running obnam backup
I quickly switched to Firefox, and upon returning to Obnam, found that it quit with an error:
ERROR: IO error for operation on /home/minoru/.mozilla/firefox/ahqodei3.default/storage/permanent/chrome/idb/2918063365piupsah.sqlite-wal: No such file or directory (os error 2)
Error: IO error for operation on /home/minoru/.mozilla/firefox/ahqodei3.default/storage/permanent/chrome/idb/2918063365piupsah.sqlite-wal: No such file or directory (os error 2)
The wal file is a temporary file that SQLite creates while writing, and it's entirely possible that the file got removed in between Obnam learning about through readdir()
and actually trying to back it up using read()
.
Similar thing happens if a directory is inaccessible due to permissions:
ERROR: IO error for operation on /home/minoru/src/obnam/inaccessible: Permission denied (os error 13)
I think Obnam should print out a message explaining that the file disappeared, and continue creating the backup.