Thanks it was very helpful! On Monday, April 29, 2013 6:38:08 PM UTC+2, Harold Giménez wrote: > > Hi, > > What goes on is that `pgbackups:restore` uses `pg_restore` behind the > scenes, with the `--clean` option. This option will remove any of the data > in your target database before restoring it, but the caveat is that it will > only do it for objects it will restore. If you have a table in your target > database that does not exist in your source database (or in your pgbackups > capture), then it will be left on the target after restore. > > More info on that from the postgres docs themselves: > http://www.postgresql.org/docs/9.2/static/app-pgrestore.html - look for > the --clean option. > > It may be safest in your case to just `pg:reset` prior to doing a > `pgbackups:restore`, it depends on your use case. > > Hope that helps. > > -Harold > > > > > On Mon, Apr 29, 2013 at 8:23 AM, Michel Pigassou > <[email protected]<javascript:> > > wrote: > >> Hi. >> >> Several times I have used pgbackups:restore for a Rails database and it >> messed with my migrations, saying that the table already exist. >> In this case I resolve the situation by resetting the DB (pg:reset) and >> then restoring it. >> >> But it says here >> https://devcenter.heroku.com/articles/pgbackups#restoring-from-backupthat >> "Restoring a backup is a destructive operation: the restore operation >> will drop existing data and replace it with the contents of the backup.". >> However this was not my experience. >> >> Any comment or suggestion? >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Heroku" group. >> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en_US?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Heroku Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >
-- -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Heroku Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
