We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Backing up a Website properly?

I have been trying to back up a website with say, 2000 files on it. The ftp connection drops from time to time but my program (Cuteftp) can auto-resume. However I am not convinced I've backed up all files - what I'm looking for is a way of counting the files on the site (I don't control the server, just have a basic PHP Admin panel access) to check, or better, are there any programs out there that can back up via ftp to one's PC in a verifiable way and even only copy files that are newer or added on the Website?
«13

Comments

  • DrBenway
    DrBenway Posts: 256 Forumite
    NURSE: "Shouldn't it be sterilized, doctor?"
    DR. BENWAY: "Very likely but there's no time."
  • DrBenway
    DrBenway Posts: 256 Forumite
    write a php script to count the files
    NURSE: "Shouldn't it be sterilized, doctor?"
    DR. BENWAY: "Very likely but there's no time."
  • buglawton
    buglawton Posts: 9,246 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    The Windows GUI version of Wget looks ideal for my needs. Reading the manual, the only thing I'm not sure about is whether it follows links to decide what to download or whether it does a directory lookup on the hosting server like an ftp program would do. If via links, then it would try to download all the php generated dynamic content which would not be good news!

    Brilliant piece of advice Benway, I will be trying this program out.
  • A simple idea may be to compare the folder size of the web site and the backup version. If they are them same size you have copied all the files accross.

    Dan
  • buglawton
    buglawton Posts: 9,246 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Yes I agree. However I have only PHPAdmin Panel access to the site, not full control. So how do I get the site size and/or the number of files?
  • Mad101daN
    Mad101daN Posts: 84 Forumite
    Part of the Furniture
    Can you not use cuteftp to give you the info ?
  • buglawton
    buglawton Posts: 9,246 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Looked around all the obvious Cuteftp options - no method there, it only counts 1 level down from a dir.
  • DrBenway
    DrBenway Posts: 256 Forumite
    buglawton wrote:
    The Windows GUI version of Wget looks ideal for my needs. Reading the manual, the only thing I'm not sure about is whether it follows links to decide what to download or whether it does a directory lookup on the hosting server like an ftp program would do. If via links, then it would try to download all the php generated dynamic content which would not be good news!

    Brilliant piece of advice Benway, I will be trying this program out.

    You miss the point of wget. Wget is an all rounder.

    It doesn't just talk http it talks ftp as well. See: http://www.gnu.org/software/wget/manual/wget.html#Very-Advanced-Usage

    Never used wget gui only cli so cant comment on that.

    I would also check what access you have to the webserver. If you have shell access and it is running some version of GNU/Linux then there are many different approaches you can take.

    P.S. if you have any mysql data (or similar), dont forget to back that up as well.

    A backup is for life not just ...
    NURSE: "Shouldn't it be sterilized, doctor?"
    DR. BENWAY: "Very likely but there's no time."
  • DrBenway
    DrBenway Posts: 256 Forumite
    Mad101daN wrote:
    A simple idea may be to compare the folder size of the web site and the backup version. If they are them same size you have copied all the files accross.

    Dan


    This idea will not necessarily work. For instance the size of a directory on Linux
    when copied file by file to another location is not always the same. Ideally you should copy the files one by and check the exit codes of the copy or do diffs on the file (which may not work if you are ftp in ascii mode).

    All O/Ss have there little discrepencies. Just look at the properties of a file in windows explorer. Is the file size the "Size: 485KB" or the "469,550 bytes" right next to it. Or is it the "Size on disk: 460KB" or the "471,040 bytes" right next to that. And the original was none of the above because of the ascii conversion mentioned above.
    NURSE: "Shouldn't it be sterilized, doctor?"
    DR. BENWAY: "Very likely but there's no time."
  • buglawton
    buglawton Posts: 9,246 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    I could see that Wget has loads of functionality & that I will have to invest some time in learning how to use it - in ftp mode which would suit the purpose of backing up PHP scripts.

    About comparing file sizes - actually, a simple count comparison would do for an initial backup. I have only the most basic phpMyAdmin panel access, have yet to work out if there's an ftp commnad to count all the files in all directories.

    The DB is not really an issue - it backs up fast using the MySQL control panel and I can check the result.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.1K Banking & Borrowing
  • 253.6K Reduce Debt & Boost Income
  • 454.2K Spending & Discounts
  • 245.1K Work, Benefits & Business
  • 600.7K Mortgages, Homes & Bills
  • 177.5K Life & Family
  • 258.9K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.