3cc Internet Services

  • Increase font size
  • Default font size
  • Decrease font size
Home Musings
Musings

Musings are short articles written by members of the 3cc team in response to a customer query, something they've come across for the first time, or something they thought might be useful to someone.



Where are Plesk Backups kept?

Plesk incorporates a useful backup utility which allows an easy backup of your server, on a schedule or just when you please (AKA log in and click backup…). You can choose between local backups and remote backups too, allowing you to co-locate your backups for safety.

When the backup process is interrupted there can be huge temporary files left which will soon fill up your server and cause it to cease all processes. You won’t be able to access Plesk or any MySQL, for example. We had this problem recently on a client’s server where his FTP server was full - but the system had continued making backups in the temp folder. These were not moved or removed so it was a matter of days before these 20GB+ backups filled his HDD.

There’s an easy way to solve this problem.

Using a SSH client (such as PuTTY), log into your server with the root account. This will allow you unrestricted access.

You will then need to navigate to the /var/lib/psa/dumps/ directory as this is where the backups are stored by default.

In this directory is a folder for each Client on the Plesk server (these are the numbers) and a temp folder. If you cd to the temp folder you can remove (using the RM command) any old files, and failed backup files. For example, to delete backup.backup from the current directory:

rm backup.backup

If you’re looking to move the backups to a new server, or download them, you can find them in /client_number/domain_number/ as large backup files. You can use the move command to move it to a web accessible location. For example, to move the file backup.backup from the current directory to a top website directory, you would use:

mv backup.backup /var/www/vhosts/3cc.org/httpdocs/backup.backup

I would then be able to access backup.backup from http://www.3cc.org/backup.backup.

These commands were useful quite recently when a server needed reinstalling. We simply downloaded a backup of every site on the server, reinstalled the server, added all the domains back into Plesk and uploaded the files into their former positions. The Plesk backup agent then restored the sites.

Simple & effective.

 

Godaddy FTP Backup Servers - Dedicated Plesk Server

One of our clients recently had an issue where his Godaddy FTP Backup Server was full - causing his seperate dedicated Plesk Server to fill up it’s own Drive with Temp files, while at the same time use a lot of resources trying to put files to the full FTP backup server.

You can sign up for a remote backup server when you order a godaddy hosting service, and it does sound a good idea considering it should keep your data safe. You can only access the data on the FTP server from within the Godaddy network - stopping any outside access.

When Plesk attempts to connect to a remote FTP server, it first tries to place a file on the server - which is a no-go if the server is full. This fails of course, so you can’t even get a directory listing of the remote server through Plesk.

Easy solution though - connect to your server through SSH and then use commands to connect to the remote FTP through your server.

  1. Open your SSH application of choice (we use PuTTY, available free from greenend.org.uk) and connect to your server. Use your main IP address or your hostname (domain name), depending on what your host supports. For dedicated servers from Godaddy, either can be used.
  2. Once you’ve logged in with your root username and password, simply enter

    FTP XXX.XXX.XXX.XXX (where xxx…. is the IP address of the FTP server) and hit enter.
    then your login username, hit enter and then your login password (also followed by enter). For Godaddy all of this is available in your Server Management Area.

  3. Now you should be logged on to the server. Type DIR and hit enter to produce a list of the directory contents. This also shows file sizes and other details.
    1. You can DELETE individual files on the server using the DELETE command. For example, to delete info.php use DELETE info.php and hit enter.
    2. To change directories type CD directoryname/ and hit enter.
    3. To copy a file to your local server type WGET filename.file and hit enter. If you don’t specify a directory then the file will be copied to your server in the /root/ directory. You can access this directory by connecting to your server using PuTTY and typing DIR and hitting enter when you’ve logged in. (It will be in the default directory).

That’s a basic guide, there are many better out there but this follows the basics. There are a couple of useful SSH commands on this site, including how to set specific options.

 

Updating MySQL Prices by a Percentage

The other day we had the simple request from a client - they asked us to update every price on their ZenCart ecommerce site. They asked us to increase their prices on ALL their products by 8%.

This is a simple bit of SQL which updates all the numbers in a field by a percent.

Let’s say our database is called catalog.

Our table is called products.

Our field is called products_price.

So the query on the catalog database would be:

UPDATE products SET products_price = products_price * 1.08

Simple! ‘UPDATE products’ tells the database which table we’re talking about, and ‘SET products_price’ will alter every value in the table in the ‘products_price’ field.

Then, we say ‘products_price = products_price * 1.08′, which simply says that the each value for products_price will be 1.08 times the current value. As we know, a value * 1.08 is 8% bigger.

But wait! That’s given us some nasty prices - for example,

523.99 * 1.08 = 565.9092

4 decimal places? We could use the ROUND function to round our values to 2 decimal places.

UPDATE products SET products_price = ROUND ( products_price , 2 )

I’ve kept it in the same format as above so you can see how it is used. This will round all values to 2 decimal places. Now, to run both queries at the same time:

UPDATE products SET products_price = ROUND ( products_price * 1.08 , 2 )

Easy! That’s updated all your prices in a couple of seconds. This was run on a site using ZenCart - that’s where the database structure is from, while the query was run in phpMyAdmin.

 

eBay.co.uk and the Google Base Connector - Upload direct

Not that long ago, Google offered a “Google Base Connector” which basically loaded up your ebay store and transferred all your products to Google Base.

Also not that long ago, eBay started putting its own feed on Google Base - and recently Google stopped supporting the base connector because of this.

There are several problems here.

  1. eBay do not include everybody’s products. Just do a search and you’ll find that lots of people have suffered falling sales due to the demise of the google base connector.
  2. You no longer have any control about when the feed can be uploaded to base - you’re trusting eBay to include you.
  3. You can’t brand your eBay store as your own - on google base your store comes up as “eBay.co.uk” as opposed to your merchant name.

There’s an easy fix for people with eBay stores though. Simply hit “Manage my shop” and go to “Listing Feeds” here. Enable feeds and copy your google base specific feed address (will be “http://esssl.ebay.co.uk/GetListings/yourstorename?fmt=g”).

Now head over to base and register this data feed with the name “yourstorename.htm” (changing your store name for the one in the link). Head to the settings tab up the top and paste the ebay link into the “Website URL (Optional)” box, then hit submit.

Now all you have to do is go back to the data-feed page, and create a schedule with the link you got earlier & a date and time to get the file every day, week or month.

All that’s left now is to sit back and wait!

The key thing here is using “http://esssl.ebay.co.uk/GetListings/yourstorename?fmt=g” for both the website address AND feed address. If you try and use anything else it’ll fail. Also make sure the rest of the settings on your account look ok before you submit your first feed

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  Next 
  •  End 
  • »


Page 1 of 2

Monthly Special

NEW! Now offering dynamic Joomla websites upon request!

3cc Team

3cc Internet is a dynamic team of individuals from throughout the UK, producing high quality, functional & accessible websites to clients across the world.

 

From photo galleries to ecommerce we excel in creating the best sites possible - and offering excellent after sales care to keep everything running smoothly.

 

Get in touch today to see how we can help you!