Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for rsync/s3sync #16

Open
saturnflyer opened this issue Mar 6, 2010 · 4 comments
Open

Option for rsync/s3sync #16

saturnflyer opened this issue Mar 6, 2010 · 4 comments

Comments

@saturnflyer
Copy link

I'd love to be able to sync a directory rather than tar and upload the same thing if it never changes.
Has anyone looked into adding this to this gem?

@hamin
Copy link

hamin commented Mar 8, 2010

@saturnflyer, I guess I can see why you would want to do that but then again, imho it might be better not to sync the directory and actually copy the directory in its current state instead (as the safe gem currently does).

Here is my reasoning. When you are trying to create as fail safe of a backup solution as possible, it has been my experience that when backing up databases corresponding to an app, it is best to backup the actuall app directory when you backup the database itself. This prevents from your actual database backup from being out of sync with the actual app code. The safe gem provides this functionality quite well as it is. So instead if you sync these directories (I'm assuming you're talking about app code) instead of just backing them up in their state as is, you're just adding an unnecessary step (imho) and possible point of failure when you would be trying to restore the said backup db and app. One of the goals of a good backup solution should be to ensure that both the db and app can be restored fully to their states with respect to each other, and not just incremental changes that occur with db or app alone.

To put it in simpler terms, you probably are not and would not do incremental db backups, then why do the same with your app code? Also, I would even go as far as backing up the virtual host config file for the app when running backups. Though this may seem unnecessary, there are times when vhost configurations are quite verbose and if they do change, it is better to be prepared for such changes in your backup strategy. And again, the safe gem allows you to do this to.

Again, this is all my humble opinion regarding backup strategies. Taking that into consideration, I'm not sure if such a feature for the safe gem is necessary (imho).

@saturnflyer
Copy link
Author

Thanks for the opinion hamin, but think of it in terms of files from using Papercilp. I want to backup my application and my db in entirety, but a directory of files from using Paperclip makes that backup massive. What would be better, is to backup the application code, backup the database, and sync the attached documents.

Now I know that leaves a hole in that an attached file could be deleted in the database and pulling from a previous version would not find the file, but I think that's acceptable as long as its understood.

@hamin
Copy link

hamin commented Mar 8, 2010

@saturnflyer... oh.. wow I don't know why I didn't think that you were referring to attached documents. But yeah, that sounds like a doable feature and a good idea. I actually did a rake task using rsync to do some backup stuff back a couple of years ago on a project. I might be able to help out on this. No promises yet :)

@gautiermichelin
Copy link

UP 👍

I'm intending to implement safe on the dedicated servers I have, that handle CollectiveAccess database. Large attached documents (thousands of pictures, eventually audio and video) are here, as I'm talking about museum collections.
I'm willing to work on that, anyone interested in ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants