fix: rclone PC-to-PC sync — serve backups, chat-history, uploads via filters; save source before Sync Now
The WebDAV server was narrowed to serve only backups/ (to stop exposing .env), but the receiver still pulls /backups, /chat-history and /uploads, so every sync failed with "directory not found". Serve the app root filtered with --include to just those three folders; everything else (.env, source, config/key files) returns 404. Sync Now now saves the typed source IP/port before pulling, since the pull reads the saved config. stop-app.sh also frees port 8080: kill -9 on the backend orphans the rclone child, which then keeps the port with stale settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -142,6 +142,14 @@ function RcloneBackupSection() {
|
||||
|
||||
const pullNowMutation = useMutation({
|
||||
mutationFn: async () => {
|
||||
// The pull reads the saved config, so persist the source typed in the
|
||||
// form first — otherwise Sync Now fails until "Save" is clicked.
|
||||
const saveRes = await apiRequest("PUT", "/api/database-management/rclone-config", {
|
||||
sourceIp,
|
||||
sourcePort,
|
||||
});
|
||||
if (!saveRes.ok) throw new Error("Failed to save source PC settings");
|
||||
|
||||
const res = await apiRequest("POST", "/api/database-management/rclone-pull-now");
|
||||
if (!res.ok) {
|
||||
const body = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user