FTP Merge Files

Any decent FTP client will have preferences that you set.

I think default should be merge on upload and (maybe) replace on download but definetly merge on upload.

I hope the xenforo documentation mentions this.
 
FileZilla is what I use. Here is where the Xenforo docs confuse me:

"If done correctly, you will be overwriting a number of existing files; you should allow your FTP client to do this if it prompts you."

Then:

"When uploading files, it's very important that you "merge" files with what's on the server. Some FTP clients may simply replace the contents on the server with exactly the contents that you're uploading. If this happens, some files and data may be lost."

There is no merge option in filezilla that I see. Only overwrite or skip.
 
If you're using FileZilla, you want to "overwrite" the files when you're upgrading.

"When uploading files, it's very important that you "merge" files with what's on the server. Some FTP clients may simply replace the contents on the server with exactly the contents that you're uploading. If this happens, some files and data may be lost."
What they mean here is some FTP clients will delete the entire folder and write all new contents. FileZilla does not do this.
 
If you tell FileZilla to merge the contents of the upload folder, is it doing that recursively? And is that even the desired behavior when uploading the contents of the "upload" directory for the XF1 > XF2 upgrade?

For example, there's a "js" sub-directory in the XF2 upgrade "upload" directory: Do you want to merge the files contained in the "js" directory with what's already on the server with your XF1 installation? Or do you want to essentially delete what's contained in the XF1 js directory?

EDIT: To answer my own question... When uploading a directory, FileZilla gives the "overwrite?" prompt for every file within the directory, so it looks like you can effectively merge contents by choosing the overwrite option. Test it out yourself, though. :)
 
Last edited:
The word "Merge" makes me think we have to compare each file (new vs old) and make sure all the code from the new and old versions of the files is merged into a single file. The problem with merging old and new is that if Xenforo has intentionally removed a section of code from a new file, we would be putting the deleted code back if we merged the contents of the old and new version of each file.

That brings up 2 questions for clarification:
1) If we've made no edits to a specific file, would it be safe to just overwrite the old server file with the new /uploads file that has the same path and file name? I'm just talking about specific files, not directories.

2) When the documentation says 'merge" is it talking about a true file-for-file, line-by-line code merge, or does it just mean that we should overwrite and not delete and existing folders and files?
 
Last edited:
The documentation is not completely clear. What happens with FTP merge is folders are merged, files are overwritten. So when the upload contains those files that are already on the server, those ones are overwritten, but not those files on the server that are not in the upload, they remain as they are.
 
When dealing with FTP.. XF has NO intervention in the transfer.. you either ship out the new files (in the new format) or you depend on your FTP transfer program to be able to merge updates with existing PHP file structure... personally.. I don't trust the "merge" feature... if it's a new file... it's a new file.
Settings should ALWAYS be stored in the database and physical file changes should never affect that (unless the add-on has taken a major dump upon itself).
 
Your FTP application will automatically merge the directories and overwrite the files as required - choose overwrite when prompted.
The above sentence makes total sense to me - merge directories, overwrite files.

But I'm here reading this thread because the upgrade instructions in the manual say:
When uploading files, it's very important that you "merge" files with what's on the server.
which made no sense to me, because I can't contemplate an FTP client which is capable of somehow automagically merging actual files.

So... Please take this as a +1 for a tweak to that line in the upgrade instructions, because right now I suspect it's confusing more people than it helps. Everyone who has upgraded installations in the past has no doubt worked this out and no longer notices an issue, but everyone has a first time ;)
 
Top Bottom