During my programming work I had to do some system administration tasks, and since a while I'm also maintaining some servers. This is a log for the problems I find - and hopefully their solutions.

Wednesday, April 06, 2005

Backing up an ftp-only site

One of my new sites has an ftp account only, but still, I'm only sleeping well if I can back everything up. I thought a simple mirror would be enough, and when I have the files on a more controllable box, I can put them into my regular backups. That's exactly what I did:

  1. Installed the mirror package with aptitude (by the way, it kicks the ass of apt-get)

  2. Created the following mini package file, saved as /home/someserver_backup/someserver_mirror_package:
    package=someserver.com
    site=ftp.someserver.com
    local_dir=/home/someserver_backup/someserver.com/
    remote_user=someftpuser
    remote_password=someftppassword
    remote_dir=/
    passive_ftp=true
    get_patt=(^http|^cgi)

  3. Tested it with mirror -n /home/someserver_backup/someserver_mirror_package (if you see filenames running on the screen, you're probably ok)

  4. Added /usr/bin/mirror
    /home/someserver_backup/someserver_mirror_package
    to backup2l.conf's PRE_BACKUP section

  5. Ran backup2l -b to see if everything's ok

  6. Smiled

0 Comments:

Post a Comment

<< Home