backup dan sync database dari aplikasi di heroku
backup
syntax:
heroku db:pull sqlite://nama-backup.db --app nama_aplikasi
sync
syntax:
heroku db:push sqlite://nama-db.db --app nama_aplikasi
jika opsi –app tidak disertakan, maka aplikasi yang dipakai adalah aplikasi yang berada pada heroku info.
real worlds:
sopir@debian:~/fix$ heroku db:pull sqlite://mainpagedeanet-backup.db --app mainpagedeanet Loaded Taps v0.3.9 Warning: Data in the database 'sqlite://mainpagedeanet-backup.db' will be overwritten and will not be recoverable. Are you sure you wish to continue? (y/n)? y Receiving schema Schema: 100% |=======================================================================================================================| Time: 00:00:42 Receiving indexes schema_migrat: 100% |=======================================================================================================================| Time: 00:00:01 Receiving data 9 tables, 28 records items: 100% |=======================================================================================================================| Time: 00:00:04 open_id_authe: 100% |=======================================================================================================================| Time: 00:00:02 comments: 100% |=======================================================================================================================| Time: 00:00:05 schema_migrat: 100% |=======================================================================================================================| Time: 00:00:05 stars: 100% |=======================================================================================================================| Time: 00:00:10 open_id_authe: 100% |=======================================================================================================================| Time: 00:00:02 users: 100% |=======================================================================================================================| Time: 00:00:15 categories: 100% |=======================================================================================================================| Time: 00:00:01 open_id_authe: 100% |=======================================================================================================================| Time: 00:00:01 Resetting sequences sopir@debian:~/fix$
sync database ke dyno apps heroku:
sopir@debian:~/public_html$ heroku db:push sqlite://blog.db Loaded Taps v0.3.9 Warning: Data in the app 'sopir' will be overwritten and will not be recoverable. Are you sure you wish to continue? (y/n)? y Sending schema Schema: 100% |=======================================================================================================================| Time: 00:00:02 Sending indexes Sending data 1 tables, 0 records posts: 100% |=======================================================================================================================| Time: 00:00:00 Resetting sequences sopir@debian:~/public_html$




mantap nic share..
trimakasih gan atas sharenya alhamdulillah sangat bermanfaat
sama2..