Copying filters

General discussion of PokerTracker 3.

Moderator: Moderators

Re: Copying filters

Postby Freakdaddy » Tue May 12, 2009 3:58 pm

WhiteRider wrote:Ah, OK - I'll give it a go myself.
Bear with me..


Thanks. The only thing I can think of is if you have to delete the settings table, then create a new blank one and then import? I didn't want to try it without confirming anything first.

Let me know what you think, and thanks for the help.
Freakdaddy
 
Posts: 14
Joined: Sat May 09, 2009 8:25 pm

Re: Copying filters

Postby WhiteRider » Tue May 12, 2009 5:05 pm

Yes, that's what I was wondering - I probably won't have time to experiment with this tonight (it's getting late here) but I'll have a play around tomorrow.

If you want to experiment yourself you could create a new empty PT3 database (Databases > Database Management > New), create a filter then close PT3 down and use PGAdmin to drop the table then recreate it and restore your backup into that.
It may still not work if the indexing is independent of the table, but this won't affect your main database.

You should probably make a backup of your main database anyway, if you haven't already.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Copying filters

Postby WhiteRider » Wed May 13, 2009 7:05 am

Hmm - it looks a bit dangerous to me to be playing around with that table since it contains other settings too.
If the filters were in a table on their own I think this would work, but as it is I think there is too much potential for breaking things.
Kraada knows more about this stuff than me so he may be able to see a safe way of doing it, but since the filters are included in the middle of the table I think it's not going to be easy.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Copying filters

Postby kraada » Wed May 13, 2009 12:48 pm

Okay, I've done a bit of digging and found a slightly more convoluted way to do this but it's guaranteed not to touch your other settings.

It does require you not to have any duplicate filter names on the target computer, though. If you do, it will error out, but you can delete those filters from within PT3 (and hopefully it wouldn't be too many of them).

I'm going to call the computers in question Primary and Secondary. Primary is the computer that HAS all of the filters on it now. Secondary is the computer they're going.

On Primary run the following query:

CREATE TABLE filtersbackup AS select * from settings where setting_name LIKE '%ilter%';

Back up the filtersbackup table as previously described in pgadmin3.

Go to Secondary. Restore the filtersbackup table as previously described, since you shouldn't already have a filtersbackup table there, it should restore successfully. Then run the following query on Secondary:

INSERT INTO settings SELECT * FROM filtersbackup;

Once that completes successfully you can run:

DROP TABLE filtersbackup;

on both machines. You should now see your filters once you restart PT3.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Copying filters

Postby Freakdaddy » Fri May 15, 2009 5:35 am

Thanks. Trying to work it out, but I messed something up pretty bad. When I tried the first suggestion of backing up the settings table, and restoring, it messed up several things in PT3. So just trying to work through how to recover everything. Been working on it today, and I'll probably have to re-install everything I fear, and it looks like I'm going to lose all my current filters (which took forever to create). :( So kind of bummed about that.

When I work that part out, I'll try your suggestion Kraada.
Freakdaddy
 
Posts: 14
Joined: Sat May 09, 2009 8:25 pm

Re: Copying filters

Postby kraada » Fri May 15, 2009 11:50 am

If you have the backup, you can always manually drop the settings table, from pgadmin3, then restore just it from the backup and that should actually bring things back to the way they were previously.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Copying filters

Postby Freakdaddy » Mon May 18, 2009 2:07 am

kraada wrote:If you have the backup, you can always manually drop the settings table, from pgadmin3, then restore just it from the backup and that should actually bring things back to the way they were previously.


Yeah, I tried, but it wouldn't restore. I'm guessing that you'd have to manually add all of the columns or something? I have the backup, but just not sure how to get it back in and working properly.I don't know but it basically hosed my database and think I lost all those filters.

I re-installed, and tried to restore the settings table, but I keep getting this error:
pg_restore: restoring data for table "settings"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1834; 0 80062 TABLE DATA settings postgres
pg_restore: [archiver (db)] could not execute query: ERROR: column "setting_name" of relation "settings" does not exist
Command was:
COPY settings (setting_name, setting_value) FROM stdin;
WARNING: errors ignored on restore: 1

My vote is that PT3 make these files external. I can't imagine that others aren't going to want to share this information with others.
Freakdaddy
 
Posts: 14
Joined: Sat May 09, 2009 8:25 pm

Re: Copying filters

Postby Freakdaddy » Mon May 18, 2009 2:40 am

For example, I re-installed PT3 on top of my current one, but I can't even get it to recognize and save my screen name. Every time I set it and then exit, it's gone. Suggestions?
Freakdaddy
 
Posts: 14
Joined: Sat May 09, 2009 8:25 pm

Re: Copying filters

Postby kraada » Mon May 18, 2009 9:52 am

You've got a PM.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Copying filters

Postby Freakdaddy » Tue May 19, 2009 2:36 am

Thanks, I responded. Forgot to ask though, would you use teamviewer or something else?
Freakdaddy
 
Posts: 14
Joined: Sat May 09, 2009 8:25 pm

PreviousNext

Return to General [Read Only]

Who is online

Users browsing this forum: No registered users and 7 guests