Subject | Re: [firebird-support] FBCOPY - how to copy a table. |
---|---|
Author | Milan Babuskov |
Post date | 2006-09-08T20:45:43Z |
Chris Voronin wrote:
installed, you can do it on a single line with something like this:
fbcopy d sysdba:masterke@c:\test\from.fdb sysdba:masterke@c:\test\to.fdb
| grep REPORTS | fbcopy c sysdba:masterke@c:\test\from.fdb
sysdba:masterke@c:\test\to.fdb
If not, then you need to use a temporary file:
fbcopy d [src] [dest] > list.txt
Edit the list.txt (with Notepad for example) and remove all but the line
that starts with REPORTS. Then run the copy:
fbcopy c [src] [dest] < list.txt
Note: I used [src] and [dest] to make it look cleaner, replace them with
"sysdba:masterke@c:\test\from.fdb" and "sysdba:masterke@c:\test\to.fdb".
e-mail me directly.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org
> I have 2 databases, exact same databases just one has a table that I need toFBCopy needs to get the table name via stdin. If you have grep
> copy over, just one table called "REPORTS". And I just can't figure out how
> to do that via fbcopy tool.
>
> Here is what I attempted:
> Fbcopy S sysdba:masterke@c:\test\from.fdb sysdba:masterke@c:\test\to.fdb
> That doesn't let me select which tables to copy and doesn't copy.
installed, you can do it on a single line with something like this:
fbcopy d sysdba:masterke@c:\test\from.fdb sysdba:masterke@c:\test\to.fdb
| grep REPORTS | fbcopy c sysdba:masterke@c:\test\from.fdb
sysdba:masterke@c:\test\to.fdb
If not, then you need to use a temporary file:
fbcopy d [src] [dest] > list.txt
Edit the list.txt (with Notepad for example) and remove all but the line
that starts with REPORTS. Then run the copy:
fbcopy c [src] [dest] < list.txt
Note: I used [src] and [dest] to make it look cleaner, replace them with
"sysdba:masterke@c:\test\from.fdb" and "sysdba:masterke@c:\test\to.fdb".
> Can someone please help me on this one? I tried online documentation, it'sYou can ask further fbcopy-related questions at firebird-tools list, or
> confusing me.
e-mail me directly.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org