meskyanichi/backup — Issue #205: Check for unknown files in storage path
Author: maxmeyer
Created: 2011-10-24 13:23:58+00:00
State: open

Hi, it's me again. I ran in a issue with old backup files.

Any idea how / where to implement a warning which the script shows if there are any unknown objects within the storage directory: files which are not listed in the Local.yml.

First shot

https://github.com/meskyanichi/backup/blob/develop/lib/backup/storage/local.rb

```ruby
##
# Performs the backup transfer
def perform!
transfer!
unknown_files_in_storage_dir?
cycle!
end
```

https://github.com/meskyanichi/backup/blob/develop/lib/backup/storage/base.rb

```ruby
def unknown_files_in_storage_dir?
type = self.class.name.split("::").last
#maybe load it only once -> cycle!
storage_object = Backup::Storage::Object.new(type)
objects = storage_object.load

[...] get and show differences between objects in yaml-file and storage dir [...]
end
```