Important Notice: Do you use Filezilla? Avatars and Attachments lost?

Started by AncientDragonfly, April 02, 2010, 11:52:18 AM

Previous topic - Next topic

AncientDragonfly

Filezilla has changed one of their default settings which will destroy your forum's avatars and attachments if you depend on it to transfer your files. 

There is a setting under the Edit menu --> Settings --> Transfers --> File Types: "Treat files without extension as ASCII file."



This should be unchecked when transferring directories that contain avatars or attachments because these are binary files.

kerbob has written instructions for backing up your site using Filezilla.

Quote from: kerbob on March 12, 2010, 03:21:21 PM
Note to all FTP users: If you are backing up your site via FTP and you're not changing the mode of transfer for files without extensions.. your doing it wrong and risk having bad backups.  The process below is specific to FileZilla but applies to any FTP client that auto determines the transfer file type (ASCII or BIN) for certains files.

SMF BACKUP PROCEDURE USING FILEZILLA FTP
1.) Make certain that FTP client is configured to use transfer type AUTO for all files and that "Treat files without extension as ASCII file" is checked and "Treat dotfiles as ASCII files" is checked.
2.) Re-check Step 1.  Highlight all remote folders on your ftp site EXCEPT the Attachments folder and download them. Why?  These folders contain ASCII files without extensions and must be transferred as ASCII.
3.) Change the FileZilla configuration so that "Treat files without extension as ASCII file" is unchecked.
4.) Re-check Step 3.  Highlight the remote Attachments folder and download it.  Why? This folder must be downloaded as Binary because it contains Binary files (jpg, gif, png, etc).

Does anyone know if there is any other folder within SMF that may have BINary files that have no extensions?

It is also a good idea to make changes (updates, modifications, etc.) on a test forum before changing your live forum, because you have an opportunity to check that everything is working correctly before you make irreversible changes to your live forum.  Using a test forum prevented me from losing my avatars and attachments because I noticed the problem on my test forum first, and left my live forum alone until I found the problem. 

To make a test forum which is a mirror of your existing forum:

1.  Backup your current forum's files and database.  If you are using Filezilla, be sure to follow kerbob's instructions above.  I like to use phpMyAdmin to back up my database, but the SMF Admin section also provides a method to do this.

2. Create a new space within your website for the test forum, and upload the files you backed up.  Again, if you are using Filezilla, be sure to follow kerbob's instructions above.

3. Create a new database through your web host's control panel with phpMyAdmin.  Make note of the database name, username, and password which you created when you made the new database.

4. In the new database, use phpMyAdmin to restore your backed up database from the live forum. 

5. Upload the file "repair_settings.php" to the root directory for your test forum.  (For example, if you put your test forum in the directory, www.example.com/testforum/, put repair_settings.php in that directory. I would recommend using a unique name for your test forum directory, as "testforum" is too easily guessed.  If you're of the tinfoil hat variety, I would also recommend password protecting the directory with .htaccess.)

6. Run repair_settings.php by going to http://www.example.com/testforum/repair_settings.php and change all the entries to match your test forum.  What is repair_settings.php

If you do not do this, any changes to the database, theme, posts, etc. that are done through the forum software will be made to your live forum instead and defeat the purpose of having a test forum.

7. Important: DELETE repair_settings.php from your site; it can be used to get your database password, and to change crucial settings that make the forum work.

8. Test your test forum.




Thanks to kerbob for the Backup instructions and for bringing this issue to light.  There is more discussion in the thread: http://www.simplemachines.org/community/index.php?topic=370199.0

Thanks to Jason of CharlottezWeb.com for the instructions and video tutorials (I hope he doesn't mind me linking them) and for being a super great host for SMF forums.

There is more information about restoring a MySQL database here: Restoring a MySQL Database

And yet more about backing up and restoring here: [Tutorial] ''How to backup & restore your forum in several different ways''

Adish - (F.L.A.M.E.R)

I had this issue previously. Since then I had been really careful about it. Thanks for the heads up once again. I am sure this will help alot of users around. :)

Arantor

Thanks for the tip - this has been an issue with FileZilla since SMF 1.1.9 / 2.0 RC1-1.

AncientDragonfly

Quote from: (F.L.A.M.E.R) on April 02, 2010, 11:57:15 AM
I had this issue previously. Since then I had been really careful about it. Thanks for the heads up once again. I am sure this will help alot of users around. :)

It will help, if it can stay up where people who take the trouble to look can see it.  I see a new thread from yesterday about more lost avatars and attachments. 

What is the proper way to ask for the thread to be stickied?

Adish - (F.L.A.M.E.R)

You should ask one of the support team members to do it for you. They are the one who have the permissions to do it.

You may also hit the "Report to moderator" and write there what you want done. Maybe that will send a message to everyone.

AncientDragonfly

Thanks, (F.L.A.M.E.R).  I'll use "Report to moderator" since so many staff members have "do not PM me" in their sigs. Just didn't want to report my own post and maybe get myself banned.   :)


Arantor

The reason for 'no PMs' in our sigs (both when I was staff and not) is simple: so many people send support PMs expecting an answer when they should use the forum.

AncientDragonfly

Quote from: Arantor on April 11, 2010, 10:09:34 AM
The reason for 'no PMs' in our sigs (both when I was staff and not) is simple: so many people send support PMs expecting an answer when they should use the forum.

I know.   :)  Just makes me hesitant to PM anyone, whether it's for support or not.

Arantor

I can't speak for anyone else, but I know that if you PM me and it isn't support, good chance of getting a reply. But I have to just say 'no PMs' otherwise most people don't listen.

Chas Large

My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

AncientDragonfly

Thanks for letting me know, Arantor.  I sympathize.  There may be a PM from me sometime in your future.

Quote from: Chas Large on April 11, 2010, 10:17:29 AM
Topic Stickied as requested. Good tip. ;D

Thanks, Chas; that was fast service.  Let's hope it helps some people.

Chas Large

I hope so too. You beat me to recommending this topic to another member who may well have suffered the same problem. If only my memory wasn't limited to 64K, I might remember a few more things :D
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

AncientDragonfly

Quote from: Chas Large on April 11, 2010, 02:31:33 PM
I hope so too. You beat me to recommending this topic to another member who may well have suffered the same problem. If only my memory wasn't limited to 64K, I might remember a few more things :D

Are you a Commodore 64?   ;D

Arantor

Could be a ZX Spectrum; or indeed any machine based on a 16-bit address bus (i.e. M6502, M6800, Z80, 8080 type processor amongst many others)

Chas Large

Now you're all taking the proverbial P*** :D

I'll have you know I started out with a ZX80. 4K memory (2KROM + 2KRAM). I wrote a word processing program for it. It displayed Word Proce.... and ran out of memory (LOL)

My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Arantor

Ah, the good old ZX80, with integer handling, a Z80 processor clocked at 3.57MHz IIRC, much improved when ZX81 came out :)

AncientDragonfly

My first was a VIC-20.  Display was on a TV, and my black and white just wasn't cutting it, so my first color TV was bought just for the VIC.  I wrote some simple graphics programs in BASIC - simple (by today's standards) was all the machine was capable of - and typed in a lot of programs from magazines.  http://en.wikipedia.org/wiki/Type-in_program

~DS~

Ok, I haven't backup in a week so I am gonna backup today but I want to make sure the image shown:
http://www.simplemachines.org/community/index.php?topic=377117.msg2594267#msg2594267
is correct? SO that it doesn't not mess up the avatars and attachments.
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Antechinus

Of course by far the fastest way to back up folders, if you have cPanel access, is to use the cPanel file manager. This is a lot faster than FTP and has no problems with any folders or their content.

~DS~

Ok, the setting should be uncheck ONLY on attachments and avatar folder, is there other folders I should be worried about that need to be download as Binary?
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Advertisement: