Unified Backups: Migrate and refactor files Targets

Summary

During the MVC implementation of the Unified Backup, only the Database target was migrated to the new codebase. This was done because Target had too much coupling that was getting hard to untangle.

The other Targets: Files and Repositories needs to be migrated to the new codebase and refactored to work with the new interfaces.

This issue is about the files target.

#481370 (closed) is the issue about repositories target.

Improvements

By moving to the new codebase we can delete unsupported behaviors and adopt the new formatted Output standard.

Risks

Involved components

  • lib/backup/targets/files.rb
  • lib/backup/targets/repositories.rb
  • gems/gitlab-backup-cli/tasks/*.rb

Optional: Intended side effects

We should be able to include those in the tests for the Unified Backups.

Due to the gem isolation, we can't test any code that requires the existing rails codebase.

Optional: Missing test coverage

Test coverage for the existing targets are currently minimal

Edited by Aakriti Gupta