惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

AirTouchの小站

DNSMgr——聚合管理所有域名DNS解析+自动续签SSL证书并部署 | AirTouchの小站 雨云香港服务器简单测评 | AirTouchの小站 七牛云 AI 狂送 token 实测到底怎么样 | AirTouchの小站 记一次博客被攻击 | AirTouchの小站 给你的 Artalk 评论区配置验证码和垃圾评论检测 | AirTouchの小站 抓紧上车!免费 E3 开发者账号又来了! | AirTouchの小站 Vercel & Cloudflare Worker 项目推荐(2) | AirTouchの小站 用 Zmail 搭建自己的临时邮箱 | AirTouchの小站 IPv6反解域名?手把手带你搞 | AirTouchの小站 AirTouchの小站 AirTouchの小站 AirTouchの小站 AirTouchの小站 macOS Tahoe 26中Electron架构卡顿的临时解决方案 | AirTouchの小站 用Obsidian插件增强Stellar写作体验 | AirTouchの小站 复习一下最小生成树 | AirTouchの小站 2025苹果秋季发布会亮点总结 | AirTouchの小站 分享几个artalk邮件通知模板 | AirTouchの小站 博客的图片应该存哪啊? | AirTouchの小站 Pic Smaller——自部署压缩图片的利器 | AirTouchの小站 企业微信的自定义域名邮箱太香了 | AirTouchの小站 所有道听途说,终获眼见为实 | AirTouchの小站 修复Vercel部署hexo导致文章的更新时间错误 | AirTouchの小站 jsDelivr国内公益加速镜像分享 | AirTouchの小站 搭建自己的busuanzi访问量统计服务 | AirTouchの小站 用Vercel和Netlify反代你的网站 | AirTouchの小站 用EdgeOne配置反向代理 丢掉丑陋的端口号 | AirTouchの小站 拼好鸽香港4区nat机器:月付3.5还要啥自行车! | AirTouchの小站 博客的新域名——xsl.im | AirTouchの小站 如何搭建自己的EdgeOne优选域名 | AirTouchの小站 用EdgeOne加速CloudflareR2存储桶 | AirTouchの小站 EdgeOne自动化上传证书并部署 | AirTouchの小站 你需要把PicGo换成PicList了! | AirTouchの小站 Cursor屏蔽中国大陆?给你解决方案! | AirTouchの小站 使用 Cloudflare Workers 自动获取必应每日壁纸 | AirTouchの小站 题解:P9509『STA - R3』Aulvwc | AirTouchの小站 题解:P11140 [APC001] E - Linear Map | AirTouchの小站 Phira多人联机服务器搭建&使用教程 | AirTouchの小站 腾讯云EdgeOne免费CDN加速你的网站 | AirTouchの小站 Hexo 博客收录指南 | AirTouchの小站 题解:P12646 [KOI 2024 Round 1] 升序 | AirTouchの小站 Cloudflare CDN优选IP加速你的网站 | AirTouchの小站 Giffgaff在线生成esim二维码 | Giffgaff sim转eSIM指南 | AirTouchの小站 AirTouchの小站 AirTouchの小站 Hexo Stellar 主题装修笔记 | AirTouchの小站 AirTouchの小站 AirTouchの小站 AirTouchの小站
AirTouchの小站
AirTouch, me@airtouch.top · 2025-09-30 · via AirTouchの小站

本篇教程难度较大,涉及数据库操作,如果对自己能力没有信心的请不要轻易尝试,出现问题后果自负

Umami是一款现代、开源的网站流量分析工具,以其极简设计和隐私保护为核心特色。你可以把它理解为更清爽、更注重用户隐私的Google Analytics替代品。

它能精准统计你最关心的数据:访问量、页面浏览量、访客来源和设备信息等,并以清晰直观的图表呈现,让你快速掌握网站表现。与许多笨重复杂的统计工具不同,Umami界面非常干净,没有令人眼花缭乱的复杂报告,专注于提供真正有用的核心指标。

更重要的是,Umami完全开源且可以自行部署,这意味着你的所有网站数据都掌握在自己手中,不会泄露给第三方。它符合GDPR等隐私法规,不追踪用户个人身份信息,也不使用Cookie。对于注重数据主权、追求简洁高效的个人站长、开发者和团队来说,Umami是一个非常理想的选择。

为什么要迁移

Umami Cloud 有两个明显的限制

  • 免费版只有 1 年数据保留
  • 只能添加 3 个网站

1 年的数据保留肯定不够用,我还想记录好几年呢。

导出 Umami Cloud 数据

首先打开 Umami Cloud,左侧找到 Data,右侧点击 Export,然后选择你的网站

这样他会给你发一封含有下载链接的邮件

但是国内的网络环境下载不了,需要自己解决

正常会下载一个 .csv.gz 的文件,把他解压

处理数据

这里用到了 RoversX大佬 的项目

github.com

https://github.com/RoversX/umami-csv-import-script

先把这个仓库下载或者 clone 下来,把解压完的文件复制进去,运行

$

python umami_import.py

然后输入你的 csv 文件的名称和新的 website ID

网址后面的一串就是 ID,比如 https://umami.haha.com/websites/73e88325-33b0-43f8-92d6-8e74c5bf19e273e88325-33b0-43f8-92d6-8e74c5bf19e2 就是 ID

这样会得到一个 website_event.csvsession.csv

然后运行这串代码,给 session.csv 去重

python
import pandas as pd

# Read the original session.csv file
df_session = pd.read_csv('session.csv')


session_columns = [
    'session_id', 'website_id', 'hostname', 'browser', 'os', 'device',
    'screen', 'language', 'country', 'subdivision1', 'subdivision2',
    'city', 'created_at'
]

# Ensure the dataframe only contains the columns defined above
df_session = df_session[session_columns]

# Remove duplicate rows with the same 'session_id'
df_session_nodup = df_session.drop_duplicates('session_id')

# Save the deduplicated data to a new CSV file
df_session_nodup.to_csv('session_export_no_duplicates.csv', index=False)

print("session_no_duplicates.csv has been successfully generated with no duplicate session_id.")

这样得到了 session_export_no_duplicates.csv

postgresql 数据库导入

接着打开数据库软件,连接到你的数据库

website-event 导入 website-event.csv

同样的方法导入 session,注意导入去重完的文件

然后刷新页面就可以啦