The huge ammount of files SMF uses

Started by lucb1e, November 04, 2010, 02:14:27 PM

Previous topic - Next topic

lucb1e

Hello everyone,

I backup my forum regularly via FTP, and it takes ages. Especially at freehosts (bplaced, which is Very good for being free) it takes quite some time and it has to check/download about 1200 files iirc (1.1.11). Then when installing a custom theme, the count goes easily to 2000 files.
The ammount of data is a small 5mb (without themes), which could be done in a minute. But spread across 1200 files it takes forever. Also after a while it quits for a few minutes saying there are too many connections from the server, though this is a connection bug and a connection limit from my host, it is quite annoying for something which could just take a minute. Uploading the forum same story...
And I don't even have any avatars/attachments yet.

Would there be a way to reduce the ammount of files? Or something which automaticly creates a temporary zipfile and gives you the download, though this might take longer than the max execution time (depends on the host ofcourse, and I don't really have any idea how long zipping 2000 files takes).
And also the general question: why are so many files required?

Thanks,
Luc.

Bigguy

To backup your forum all you need is the database backup which can be taken from the admin panel. You don't have to download all files all the time. Everything is stored in the database.

Kindred

the files required are not excessive....

doing it via FTP is, of course, a painful proposition.... since that's not the best way to do it. Most hosts have a Cpanel backup utility that will do the backup int he background and then let you download the backup.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lucb1e

Quote from: Bigguy on November 04, 2010, 02:34:46 PM
To backup your forum all you need is the database backup which can be taken from the admin panel. You don't have to download all files all the time. Everything is stored in the database.
Themes, custom files? :)
And I prefer to have a complete backup, I can upload it and recover the site within minutes after I notice it's down. If it would upload within minutes, that is... Reinstalling SMF, then themes, and then custom files is a lot more manual work.

QuoteMost hosts have a Cpanel backup utility that will do the backup int he background and then let you download the backup.
Not many good free ones. 000webhost had till 50mb a zipped backup, but it was terribly slow (and it officially disallowed communities anyway). Bplaced is a lot faster, but no cpanel or anything close.

Oya

the only way to cut the number of files is to cut functionality...

holodoc

#5
The solution for this problem is pretty simple - compress your forum folder and download the archive itself :)

If you have shell access then you could simply use tar and if you don't I believe cPanel has archiving capability. That's BTW the usual procedure when you have to deal with a large number of files to upload or download through FTP since its ridiculously slow.

Additionally if you want your backups to be fully automated you could use cronjobs to do that for you.

One question though. Isn't cPanel equipped with some handy automated backup tools?

Bigguy

Quote from: lucb1e on November 04, 2010, 06:17:03 PM
Quote from: Bigguy on November 04, 2010, 02:34:46 PM
To backup your forum all you need is the database backup which can be taken from the admin panel. You don't have to download all files all the time. Everything is stored in the database.
Themes, custom files? :)
And I prefer to have a complete backup, I can upload it and recover the site within minutes after I notice it's down. If it would upload within minutes, that is... Reinstalling SMF, then themes, and then custom files is a lot more manual work.

Themes are easy to get and custom files should really always be backed up. Everyone is right though there are options in cpanel if you have it to create backups.

青山 素子

Quote from: lucb1e on November 04, 2010, 06:17:03 PM
Themes, custom files? :)
And I prefer to have a complete backup, I can upload it and recover the site within minutes after I notice it's down. If it would upload within minutes, that is... Reinstalling SMF, then themes, and then custom files is a lot more manual work.

How often do those things change? Take a core backup then only backup changed files.


Quote from: lucb1e on November 04, 2010, 06:17:03 PM
Not many good free ones. 000webhost had till 50mb a zipped backup, but it was terribly slow (and it officially disallowed communities anyway). Bplaced is a lot faster, but no cpanel or anything close.

You get what you pay for.

By the way, some FTP clients offer a "mirror" function that would help you if you can't take backups any other way. I normally use LFTP, which works great if you are fine not having a GUI. (There is a Cygwin build if you're stuck on Windows.)
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


lucb1e

hm allright, I'll look for some PHP scripts to zip and unzip it manually then.

Kindred

that's probably the best idea. :)  and maybe consider getting a host with a decent backup utility. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

IchBin™

Quote from: Kindred on November 23, 2010, 02:38:19 PM
that's probably the best idea. :)  and maybe consider getting a host with a decent backup utility. :)

He likely won't get that unless he moves off the free hosts.

If I were you, I'd just backup all the files once. Then just backup any changes you make after that. This way, there's no reason to zip if you don't need to on a free host.
IchBin™        TinyPortal

kat

As IchBin™ said, you only, really, need to backup the software after you've altered something.

With FTP, you should be able to set the downloads to only overwrite files that are older than the ones you're downloading.

It'll only take a few seconds, that way.


Norv

SMF might use even a bigger amount of files in the future. Splitting the relevant concerns in the software in different files allows for better division of responsibilities in each part of it, and that at its turn leads to better understandability of the software and easier modding/developing for it.

As mentioned here, hosts typically have a backup system, and backup of files is only necessary when something has actually changed. Things change all the time in the database (as users post, etc), not so often at all in files.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: