Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import only imports the last week #676

Closed
JonasVautherin opened this issue Apr 17, 2023 · 4 comments
Closed

Import only imports the last week #676

JonasVautherin opened this issue Apr 17, 2023 · 4 comments

Comments

@JonasVautherin
Copy link

I tried to export my data and import it into a self-hosted v2.4.1 instance, but it only seems to import the last week, i.e. seven out of hundreds of pageviews.

When I open the exported .csv, it does have hundreds of fields, so that seems fine. Also the log said:

Your import is finished; 595 pageviews were imported successfully and there were no errors.

Am I missing something?

@arp242
Copy link
Owner

arp242 commented May 16, 2023

Is there any chance you can send me the CSV file? Then I can take a look. Otherwise it's a bit hard to say 😅

@JonasVautherin
Copy link
Author

Sure, here it is: goatcounter-export-acarg-20230516T230630Z-0.csv.gz

This is a new one (I lost the one from last month 🙈), and interestingly it does import the last month (up to ~April 9th). Which seems to be consistent with what was happening when I opened the issue (it seemed to import one week, but it was around April 18th).

However I haven't found an obvious error in the csv file around that date 🤔.

@arp242
Copy link
Owner

arp242 commented May 17, 2023

The issue is that the sites.first_hit_at doesn't get updated properly; it's a check to prevent you from going from before your site exists in the UI.

I need to fix that, but you can correct it manually with:

goatcounter db query "update sites set first_hit_at='2022-07-09 00:00:00'"

Can be done either before or after the import; just remember to restart goatcounter once you've done that.

@arp242 arp242 closed this as completed in 0230ac7 May 18, 2023
@JonasVautherin
Copy link
Author

It works, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants