mattconnolly / rails-backup-migrate

A gem providing a rake task for backing up and migrating databases and files between rails instances.
Other
26 stars 16 forks source link

The directory with files should be configurable #8

Open anrichter opened 12 years ago

anrichter commented 12 years ago

The folder 'files' that is hardcoded at the moment should be configurable. All my applications use the folder 'system' for alle the files such as user pictures.

So the possibility to define the folder name, which should packed into the backup archive, would be fine :)

mattconnolly commented 12 years ago

Hmm. It seems saving attachments as files directly to the filesystem is quite uncommon, and as you point out, can be handled very differently.

There might even be more than one folder that should be backed up.

Another consideration is that rake tasks have very poor (and ugly) parameters support from the command line.

I have two ideas for a solution:

  1. Change the task to be using a standalone command-line script instead of a rake task (e.g., "rails" or "bundle")
  2. Specify the folder to be backed up in a config file

I think 2 would be better since you could link the config file to the app in source control so that other deployments would backup/restore in the same manner.

Of, course, other suggestions are welcome! Thoughts?

anrichter commented 12 years ago

I also think the second solution would be better. I looked at the gem backup and use it now for my backup and partial restore, when i need a restore.

Your gem is perfect for me to bring mysql data from a production system into a sqlite driven development system. And this works now with the fix #7 :)