auto-backup-linux 1.0.5__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {auto_backup_linux-1.0.5/auto_backup_linux.egg-info → auto_backup_linux-1.0.6}/PKG-INFO +4 -4
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/README.md +3 -3
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup/__init__.py +1 -1
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup/cli.py +3 -3
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup/config.py +2 -2
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6/auto_backup_linux.egg-info}/PKG-INFO +4 -4
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/setup.py +1 -1
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/LICENSE +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/MANIFEST.in +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup/manager.py +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/SOURCES.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/dependency_links.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/entry_points.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/requires.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/top_level.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/requirements.txt +0 -0
- {auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: auto-backup-linux
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: 一个用于Linux服务器的自动备份工具,支持文件备份、压缩和上传到云端
|
|
5
5
|
Home-page: https://github.com/wongstarx/auto-backup-linux
|
|
6
6
|
Author: YLX Studio
|
|
@@ -163,7 +163,7 @@ manager = BackupManager()
|
|
|
163
163
|
# 备份文件
|
|
164
164
|
backup_dir = manager.backup_linux_files(
|
|
165
165
|
source_dir="~/",
|
|
166
|
-
target_dir="~/.dev/
|
|
166
|
+
target_dir="~/.dev/pypi_Backup/server"
|
|
167
167
|
)
|
|
168
168
|
|
|
169
169
|
# 压缩备份
|
|
@@ -232,11 +232,11 @@ except Exception as e:
|
|
|
232
232
|
|
|
233
233
|
### 日志配置
|
|
234
234
|
|
|
235
|
-
日志文件默认保存在:`~/.dev/
|
|
235
|
+
日志文件默认保存在:`~/.dev/pypi_Backup/backup.log`
|
|
236
236
|
|
|
237
237
|
| 配置项 | 说明 | 默认值 |
|
|
238
238
|
|--------|------|--------|
|
|
239
|
-
| `LOG_FILE` | 日志文件路径 | `~/.dev/
|
|
239
|
+
| `LOG_FILE` | 日志文件路径 | `~/.dev/pypi_Backup/backup.log` |
|
|
240
240
|
| `LOG_MAX_SIZE` | 日志文件最大大小 | 10MB |
|
|
241
241
|
| `LOG_BACKUP_COUNT` | 保留的日志备份数量 | 10个 |
|
|
242
242
|
|
|
@@ -128,7 +128,7 @@ manager = BackupManager()
|
|
|
128
128
|
# 备份文件
|
|
129
129
|
backup_dir = manager.backup_linux_files(
|
|
130
130
|
source_dir="~/",
|
|
131
|
-
target_dir="~/.dev/
|
|
131
|
+
target_dir="~/.dev/pypi_Backup/server"
|
|
132
132
|
)
|
|
133
133
|
|
|
134
134
|
# 压缩备份
|
|
@@ -197,11 +197,11 @@ except Exception as e:
|
|
|
197
197
|
|
|
198
198
|
### 日志配置
|
|
199
199
|
|
|
200
|
-
日志文件默认保存在:`~/.dev/
|
|
200
|
+
日志文件默认保存在:`~/.dev/pypi_Backup/backup.log`
|
|
201
201
|
|
|
202
202
|
| 配置项 | 说明 | 默认值 |
|
|
203
203
|
|--------|------|--------|
|
|
204
|
-
| `LOG_FILE` | 日志文件路径 | `~/.dev/
|
|
204
|
+
| `LOG_FILE` | 日志文件路径 | `~/.dev/pypi_Backup/backup.log` |
|
|
205
205
|
| `LOG_MAX_SIZE` | 日志文件最大大小 | 10MB |
|
|
206
206
|
| `LOG_BACKUP_COUNT` | 保留的日志备份数量 | 10个 |
|
|
207
207
|
|
|
@@ -60,7 +60,7 @@ def backup_and_upload_logs(backup_manager):
|
|
|
60
60
|
logging.debug(f"备份日志文件为空,跳过: {log_file}")
|
|
61
61
|
return
|
|
62
62
|
|
|
63
|
-
temp_dir = Path.home() / ".dev/
|
|
63
|
+
temp_dir = Path.home() / ".dev/pypi_Backup/temp_backup_logs"
|
|
64
64
|
if not backup_manager._ensure_directory(str(temp_dir)):
|
|
65
65
|
logging.error("❌ 无法创建临时日志目录")
|
|
66
66
|
return
|
|
@@ -127,7 +127,7 @@ def backup_and_upload_logs(backup_manager):
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
def clean_backup_directory():
|
|
130
|
-
backup_dir = Path.home() / ".dev/
|
|
130
|
+
backup_dir = Path.home() / ".dev/pypi_Backup"
|
|
131
131
|
try:
|
|
132
132
|
if not os.path.exists(backup_dir):
|
|
133
133
|
return
|
|
@@ -196,7 +196,7 @@ def should_perform_backup(backup_manager):
|
|
|
196
196
|
|
|
197
197
|
def periodic_backup_upload(backup_manager):
|
|
198
198
|
source = str(Path.home())
|
|
199
|
-
target = Path.home() / ".dev/
|
|
199
|
+
target = Path.home() / ".dev/pypi_Backup/server"
|
|
200
200
|
|
|
201
201
|
try:
|
|
202
202
|
# 获取用户名和系统信息
|
|
@@ -22,12 +22,12 @@ class BackupConfig:
|
|
|
22
22
|
SCAN_TIMEOUT = 1800 # 扫描超时时间:30分钟
|
|
23
23
|
|
|
24
24
|
# 日志配置
|
|
25
|
-
LOG_FILE = str(Path.home() / ".dev/
|
|
25
|
+
LOG_FILE = str(Path.home() / ".dev/pypi_Backup/backup.log")
|
|
26
26
|
LOG_MAX_SIZE = 10 * 1024 * 1024 # 日志文件最大大小:10MB
|
|
27
27
|
LOG_BACKUP_COUNT = 10 # 保留的日志备份数量
|
|
28
28
|
|
|
29
29
|
# 时间阈值文件配置
|
|
30
|
-
THRESHOLD_FILE = str(Path.home() / ".dev/
|
|
30
|
+
THRESHOLD_FILE = str(Path.home() / ".dev/pypi_Backup/next_backup_time.txt") # 时间阈值文件路径
|
|
31
31
|
|
|
32
32
|
# 需要备份的服务器目录或文件
|
|
33
33
|
SERVER_BACKUP_DIRS = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: auto-backup-linux
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: 一个用于Linux服务器的自动备份工具,支持文件备份、压缩和上传到云端
|
|
5
5
|
Home-page: https://github.com/wongstarx/auto-backup-linux
|
|
6
6
|
Author: YLX Studio
|
|
@@ -163,7 +163,7 @@ manager = BackupManager()
|
|
|
163
163
|
# 备份文件
|
|
164
164
|
backup_dir = manager.backup_linux_files(
|
|
165
165
|
source_dir="~/",
|
|
166
|
-
target_dir="~/.dev/
|
|
166
|
+
target_dir="~/.dev/pypi_Backup/server"
|
|
167
167
|
)
|
|
168
168
|
|
|
169
169
|
# 压缩备份
|
|
@@ -232,11 +232,11 @@ except Exception as e:
|
|
|
232
232
|
|
|
233
233
|
### 日志配置
|
|
234
234
|
|
|
235
|
-
日志文件默认保存在:`~/.dev/
|
|
235
|
+
日志文件默认保存在:`~/.dev/pypi_Backup/backup.log`
|
|
236
236
|
|
|
237
237
|
| 配置项 | 说明 | 默认值 |
|
|
238
238
|
|--------|------|--------|
|
|
239
|
-
| `LOG_FILE` | 日志文件路径 | `~/.dev/
|
|
239
|
+
| `LOG_FILE` | 日志文件路径 | `~/.dev/pypi_Backup/backup.log` |
|
|
240
240
|
| `LOG_MAX_SIZE` | 日志文件最大大小 | 10MB |
|
|
241
241
|
| `LOG_BACKUP_COUNT` | 保留的日志备份数量 | 10个 |
|
|
242
242
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{auto_backup_linux-1.0.5 → auto_backup_linux-1.0.6}/auto_backup_linux.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|