How can I safely roll back a FileZilla site manager schema change without losing connection profiles?
0 reputation · 24 Jan 2024, 22:55 UTC
0 reputation · 24 Jan 2024, 22:55 UTC
After editing FileZilla's site manager XML (sitemanager.xml) to add custom fields or change the schema, I need a way to revert those changes if the file becomes invalid or causes connection profiles to disappear. The goal is to keep all existing site entries intact and usable after a rollback, without manually re‑entering data.
What is the recommended procedure to create a restorable backup of sitemanager.xml before editing? How can I verify that the backup can be restored without corrupting the site manager? Are there any built‑in FileZilla features or command‑line options that facilitate a safe rollback after a schema alteration?
26525 reputation · 25 Jan 2024, 05:38 UTC
Before you touch sitemanager.xml (or FileZilla.xml on Windows), make a copy that you can restore later. The file lives in your user profile folder:
%APPDATA%\FileZilla\FileZilla.xml~/Library/Application Support/FileZilla/FileZilla.xml~/.config/filezilla/FileZilla.xmlClose FileZilla completely. Then copy the file:
# Windows (Command Prompt)
copy "%APPDATA%\FileZilla\FileZilla.xml" "%APPDATA%\FileZilla\FileZilla.xml.bak"
# macOS / Linux (Terminal)
cp "~/.config/filezilla/FileZilla.xml" "~/.config/filezilla/FileZilla.xml.bak"
Verify the backup exists by listing the directory or opening the file in a text editor. You should see a root element like <FileZilla> and a schemaVersion attribute that matches your FileZilla release.
Now you can safely modify the file. Keep the following in mind:
<FileZilla>, <Server> nodes, and required attributes.<Custom> tags so FileZilla ignores unknown elements.After saving, open sitemanager.xml in a plain‑text editor and look for:
<FileZilla>.<Server>) remain intact.Optionally, launch FileZilla. If it starts and the Site Manager lists all sites, the XML is valid. If it shows an error or an empty list, revert immediately.
Should the edit break FileZilla or remove sites, restore the backup:
# Windows
copy "%APPDATA%\FileZilla\FileZilla.xml.bak" "%APPDATA%\FileZilla\FileZilla.xml" /Y
# macOS / Linux
cp "~/.config/filezilla/FileZilla.xml.bak" "~/.config/filezilla/FileZilla.xml"
Restart FileZilla. All previously stored profiles should reappear. Test one connection to confirm credentials are still valid.
FileZilla offers a built‑in export feature that creates a clean XML snapshot of the Site Manager. From the File menu, choose Export to save a file (e.g., site‑backup.xml). Importing this file later will restore your sites without affecting other settings.
Use comments to ask for clarification. Post a solution as an answer.
26,525 reputation · 25 Jan 2024, 09:14 UTC
To ensure a rollback doesn't trigger a "corrupt file" error, it is important to verify the XML encoding and the schemaVersion attribute. FileZilla typically expects UTF-8 encoding; if a text editor saves the backup or the edited file with a different encoding (like UTF-16 or ANSI), the application may fail to parse the profiles even if the tags are structurally correct.
Before restoring a backup, you can use a diff tool or a basic text comparison to check the <FileZilla schemaVersion="..."> line. If you are rolling back after a software update, ensure the restored version's schema is compatible with the current installed version of FileZilla. If the schema version is too old, FileZilla may attempt an automatic migration upon launch, which could potentially overwrite your manual changes again.