Support

Akeeba Backup for Joomla!

#8580 [SOLVED] Upload to ftp server useing wildcards (ie [host] or [DATE]

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Thursday, 30 September 2010 04:23 CDT

user9087
Hello

i am a web designer and web host and have 30+ joomla sites to manage.

Right now when i backup i have the filename set to [host]_[date] and use native tools to download the files to my pc.

With the new ablazy plugin im thinking about useing upload to ftp server (under post processing). On my test run i had the files uploaded to /public_html/akeeba . this gave me about 17 files in that directory. fine for one site but not 30+.

My question is is it possable to set the directory to upload as /public_html/akeeba/[sitename] or something similar. (ie /public_html/akeeba/websitewelcome.com/backup.jpa)

(on a side note do the files have to go in public_html like the tip bubble says or can it go in a folder in the root?)

sorry if this has been asked but im haveing an issue searching the fourms at the moment.

Thank you
Kyle

nicholas
Akeeba Staff
Manager
Yes it is! It's a brand new feature in the 3.1 series. You can use the same "variables" (i.e. [HOST], [DATE], [TIME]) in the directory name you specify in the post-processing engine's options. I think this is what you asked for, right?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
I will try it this afternoon. So backing up via ofsite ftp to the directory /akeeba_backup/[HOST]/[Date] will put the backup in /akeeba_backup/mywebtechgurus.com/20100910 ?

Sorry it took me a bit to respond. been busy ;)

Also im setting the file size to 5mb to prevent timeouts and this is going to creeate 10+ files on some sites. Will akeeba upload one at a time or multiple? My webhost only alows 8 connections per ip at a time

nicholas
Akeeba Staff
Manager
Make it /akeeba_backup/[HOST]/[DATE] (the variables are always uppercase) and it'll work.

Akeeba Backup will only upload one file at a time. Remember, the reason you are splitting the archive is because of the finite outgoing bandwidth of your server. If we tried to upload many files at once they would all compete for bandwidth, guaranteeing a timeout - that would be not very cool, I guess ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
2 more questions.

1. there is a setting to only keep the last x backups. does this only apply to the local server or will it delete old ones off the remote server? and when uploading does a copy of the backup remain on the server?( Never mind. Found a setting in post processing that will remove backups when finnished. )

2. Regarding ablazy plugin some sites do not get very much traffic. If someone lands on the site (causeing a backup to start) and then leaves a few seconds later will the backup continue (includeing post processing) or will it fail. And will a backup run if someone goes to www.site.com/administrator ?

Thanks

user9087
Im still not getting this working. When i click test FTP connection when configuring the profile i get this error

Could not connect to the remote FTP server.

Invalid initial directory for the remote FTP server.

i attached a copy of my settings. It does connect if i take out /[HOST]/[DATE]. I also downloaded and reinstalled Akeeba just in case i was outdated.

nicholas
Akeeba Staff
Manager
Regarding the second question, the answer is yes, but not as you might think. The backup will start and when the step finishes, it will "hibernate" until the next visitor stops by. It will also run if anyone logs into the back-end. However, due to the very low traffic, you can't hope for daily backups. At the very best you'd get one backup every 2-3 days. In fact, if you have such a low traffic site, there is absolutely no point in setting up a daily backup ;)

Regarding the other issue, as the message reads, you are not entering the correct FTP initial directory. In order to figure out the initial FTP directory of your remote server you have to do the following. Connect to your remote FTP site with an FTP application, e.g. FileZilla. Navigate into the directory where you wish to place the backups. If you are using FileZilla you should be able to see the FTP directory on the right-hand pane, just above the folder list. Copy this and paste it into Akeeba Backup's edit box, then append any variables you need to use.

The FTP engine, unlike the other post-processing engines, does not support creating directories, therefore you can't use the variables, such as [DATE], [TIME] and [HOST] in the directory's name. The reason is pretty simple. Cloud servers handle directory creation automatically. With FTP we'd have to list the parent directory's contents and create the directory if it doesn't exist. During our testing we found out that this causes great problems on many server setups, so we decided to abandon this approach and simply allow only pre-existing directories to be used.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
For the plugin im not wanting daily backups. more like every 14 or 30 days. What would happen if someone landed on the homepage and started the first step then left. and no one went back for a few days. would the next step fail? And how many steps are there?

As for post processing: [HOST] not working for FTP kills that plan. ill look at other options like dropbox.

If i use dropbox and there is not enough space what would happen? Would it keep trying or send me an email or just fail?

You help with this is much appreciated.
~Kyle

nicholas
Akeeba Staff
Manager
When I say that the backup will "hibernate" I really mean it :) The backup will not fail, it will wait for the next visitor or administrator area log in to trigger the next step. As a matter of fact, we use smart processing. As long as the visitor is on a page, new steps will continue executing in the background until the backup is complete or the visitor navigates away from the page. So, if you have infrequent but lengthy visits the backup would go on quite fast.

Using DropBox is a very good idea, indeed. If you run out of DropBox free space the post-processing (transferring archives to DropBox) will halt and the backup archives will remain on your server. The email will not indicate an error, as uploading problems are treated as warnings, not show-stopper errors (after all your backup is complete, we can't lie to you by telling you that it's failed).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
When I say that the backup will "hibernate" I really mean it smile The backup will not fail, it will wait for the next visitor or administrator area log in to trigger the next step

Oh cool!

When im back in the office on Wednesday i will have to try this.

Thanks!

user9087
Well i tried dropbox and its telling me i can not connect to host. Do i need to contact hostgator and have them unblock something on their firewall?

Odd thing is one or 2 files will show up in my dropbox. I tried having the archive size be a small at .25 mb and as large as 30mb. Makes no difference.

~Kyle

nicholas
Akeeba Staff
Manager
Can you post the log file? I want to see what happens.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
Sure. Does this log file have anything in it i should change (passwords usernames ect,)?

Odd thing is today it looks like it worked. Im still posting the log hopeing you can see what was wrong. I use hostgator.com if that helps. One thing that is different is i am now currently running the dropbox client on my pc.

(Im unable to upload the txt or zip file in both ie and firefox. im just getting a white box after clicking submit. So i uploaded to my site Here and a text version Here. )

nicholas
Akeeba Staff
Manager
The log file has all the sensitive information blanked out, except your site's domain name. Anyway, according to this log file the files have been successfully uploaded to DropBox. Since you are on shared hosting the only thing which might hamper Akeeba Backup from uploading the backup archive is the connection to DropBox having a different speed between subsequent backup attempts. You can work around this issue by lowering the part size for archive splitting.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
I think i will roll all this out to just a few sites for now and see how it works. Would a firewall or blocked ports at hostgator be an issue? If so what should i ask them to unblock? (they will unblock outbound ports only :( )

Thank you

nicholas
Akeeba Staff
Manager
No, blocked ports would simply cause a complete inability to upload any file to DropBox. Since it works some times and some times it doesn't, the only reason is the varying upload speed. As explained in the documentation, the time required to upload a file to any remote storage (such as DropBox) is proportional to the file size and inversely proportional to the upload speed. When the upload speed gets very low, it takes too long to upload the file to DropBox. Since PHP has a timeout limit, if the time required to upload is greater that the timeout limit of PHP you get a timeout error and inability to perform the post-processsing (upload) operation. As you don't have any influence on the upload speed, the only thing you can tweak is the size of the file by lowering the part size for split archives setting.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user9087
ok now i know what im doing. Thank you for all the help with this.

nicholas
Akeeba Staff
Manager
You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!