I figured it out. I could confirm that web2py uses a hash to create the files under "databases" folder. If you check that folder, you will see that every table file is prepended with a hash text. That hash is generated based on the connection string. So in my case, I get the new hash and renamed the files under "databases" folder and everything worked ok.
I don't think this is a common situation, usually you will find yourself using some DAL parameters (fake_migrate_all, migrate_enabled), or using the methods for export/import db to/from csv files. El martes, 24 de febrero de 2015, 10:01:16 (UTC-3), Lisandro escribió: > > I have a website running with a database, and I want to make an exact copy > of the website (that is, copy all web2py folder with its applications and > all the stuff), and I would like to assign that new site an exact copy of > the database, but with another name. I'm using postgresql, and I already > figured out to make a dump of the original db and then restore that dump to > a new db with a different name. > > However, in the new copy of the site, all the filenames under "databases" > folder start with a hash. That hash, accordingly to documentation, is > created based on connection string. So, in my case, I need to use the > original "databases" folder with the new database name. > I already tryed fake_migrate_all and migrate_enabled but, in this specific > case, it's useful, because my models have some custom migration code, and > they need to create some new tables, keeping the old ones too). > > I guess that if I get the correct hash for the new connection string, and > then replace the old hash with the new one in the filenames of "databases" > folder, then it would work. But it's just a guess. > Any tip on this? Thanks in advance! > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" 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/d/optout.

