Netcup 自动创建快照并清理旧快照,默认每天北京时间早上 06:44 运行,可自行修改
联系方式
点击右上角的 Fork 按钮,复刻项目到你的GitHub账户。
进入你复刻的仓库,点击 Settings → Secrets and variables → Actions,点击 New repository secret:
- Name:
NC_CONFIG - Value: 你的JSON配置内容(参考下方JSON配置说明)
进入 Actions 页面,点击 Enable workflows 启用自动运行。
点击 Run workflow 手动运行一次,确保配置正确。
{
"accounts": [
{
"username": "NetCup用户名",
"password": "NetCup密码",
"servers": [
{
"name": "服务器名称",
"snap_count": "保留快照数量"
}
]
}
]
}accounts: 账户数组,支持多个账户username: NetCup SCP 登录用户名(必填)password: NetCup SCP 登录密码(必填)servers: 服务器配置数组(必填)name: 服务器名称,在 SCP 面板显示的名称(必填)snap_count: 保留快照数量,不填默认为 3
{
"accounts": [
{
"username": "10010",
"password": "password123",
"servers": [
{
"name": "v2202505271811338445",
"snap_count": 5
},
{
"name": "v2202505271811343555",
"snap_count": 3
}
]
},
{
"username": "10086",
"password": "another_password",
"servers": [
{
"name": "v2202505271811341234",
"snap_count": 2
}
]
}
]
}如果所有服务器保留相同数量快照,可以使用字符串数组:
{
"accounts": [
{
"username": "123456",
"password": "password123",
"servers": [
"v2202505271811331234",
"v2202505271811345678"
]
}
]
}使用简化格式时,所有服务器默认保留 3 个快照。