Top articles and links related to Tradebit:

Facebook Integration

Converting files

Affiliate program



Top Sellers on Tradebit

Games Charts
Free Game Trials to download

Sound Effects
One of the largest sound collections on the planet!

Service Manual
Our huge PDF manual collection has more than 30,000 files for your car, bike or electronic device.



Use your FTP/SSH account as a backup service (Part 1)

If you have a tradebit account or a hosting account somewhere else, does not matter, if you want to backup your data from one server to another: if you host on Linux, you probably already have all you need.

Let’s say you want to backup your web directory on a daily basis:

  • Web directory is in /wwwroot/mysite.xy/
  • You have access to your server with SSH
  1. Login to your webserver, e.g. using putty
  2. Create a text file, e.g. with vi /wwwroot/backup.sh

    #!/bin/bash
    cd /wwwroot
    tar -cvzf myarchive.tgz mysite.xy/

    These 2 lines mean: go to the /wwwroot directory and create a file archive with all the files from mysite.xy
  3. Allow this text file to be executed as a shell command: “chmod a+x /wwwroot/backup.sh”
  4. Now create a cron entry, an entry that is executed on a pre-configured time:

    0 5 * * * /wwwroot/backup.sh

    Which means: every day at ZERO minutes, 5 o’clock - the order is: minutes, hours, days, month, years

Now you have a daily creation of the the backup archive, which is still in the /wwwroot directory. Tomorrow we will work on the copying to another server automatically!

del.icio.us Facebook StumbleUpon

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image


spacer spacer spacer
sell downloads, mp3, software sell downloads
Member Login
  Password lost?   Sign up
endGrey
Browse Files Publish/Sell My Purchases Forum Blog Help About
Shopping Cart:
now in your cart
cart (0)
Items