I am currently working on a project and i would like my users to be able to backup/restore theirs accounts.
I am looking for a rails plugin/gem that would easily do that, ie :
current_user.backup()
=> backup_file
current_user.restore(backup_file)
=> database import/replace
I don't know if my question is very clear, but i would like to backup every user's related object (posts, comments, etc) and to be able to restore them from a backup file.
Thanks per advance,
Cédric.
There's no such gem b/c user data is very specific to each project.
You will have to write it yourself.
Related
Is it possible to let individual users backup their posts to their google drive from a Rails app?
Is there anyone who has done something like this.
User should be able to backup their posts at an interval of their choice(daily, weekly, etc). And also can restore their backups from the Rails app itself, in case of data loss.
Yes, it is possible.
Define "something like this". Do you mean saved something to Google Drive from a rails app? Sure, there's a gem for that. Do you mean saved posts to Google Drive? If so, that's not so different than saving anything else to Google Drive. You just need to serialize the records into a document then upload.
For automated backup look into background and cron jobs. If during load to Google Drive you've serialized the records effectively, restore should be relatively trivial.
Before I delete an application, I want to be asked for:
Do you want to delete also the application data?
as we know it from other applications. I searched for it but I don't found any clue. It is related to CoreData.
Do you know how I can achieve this?
Thanks for any help!
When your application is deleted, its associated data will be as well.
You can instead offer to persist it to an external resource (Firebase, Azure, etc.). Then, it can be available at a later date. However, you must do this prior to deletion, as there is no way for your app to know it is being deleted & respond to it.
I am learning iOS file system to store my game data like saving the amount of money earned and things like this in a xml file.
The question is where should I store them?
I read this: File System Basics
And I don't know that I should save data in Documents directory or Application Support directory.
Because the data I want to save is something that is not associated with user's documents and user will never see it so it should be in Application Support, but on the other hand it's something that is affected by user interactions so it should be in Documents.
I think it is the Application Support/MyGame as per the Apple Developer guide link shared by you. You are confused by the fact that it should not be something affected by user interaction. Actually it means user should not directly interact with these. See this from the link: File System Basics
Using something like Parse may slow down your app as it needs to interact with their server, but you do get a backup.
For something of this size, I'd use a mobile backend solutions provider like Parse or Firebase. Personally I use Parse in my projects and is very easy to implement advanced functionality into your apps like user registration/save data to users.
Hope this helps.
I would like to use Heroku PG Backups to able to restore my data in case anything was deleted by mistake. My question is, what if I want to restore just a certain record as well as its associations. Like a student and his grades for example..
I found a similar question: How do I restore three items from a backup made using Heroku PG Backups?
However, I don't know what it means to cherry pick items.. How do I do that? .. manually?
Thank you,
However, I don't know what it means to cherry pick items.. How do I do that? .. manually?
It's a manual process, yes. You can for example use dblink[0] to connect from one DB to the other and pull in the relevant records.
[0] http://www.postgresql.org/docs/9.1/static/dblink.html
Here's a full example on how to use dblink on heroku:
https://gist.github.com/hgmnz/5100682
We are using JIRA 4.4 with crowd.
We want to dump users photos from Active Directory into the avatar folder (inside jira-home directory) and than to automatically associate those photos with JIRA users (we don't want each and every user having to manualy choose their avatar).
Can this be done through database insert/update operations?
This answer may not be too helpful but have you already looked into this? The only problem is that the REST API for managing avatars was introduced in JIRA 5.0+
I'm not aware of a easy way of doing it on JIRA 4.4 unfortunately.