Skip to content

killman88/webbackup_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WebBackup_Tool Readme

Description:

This script aims to help you to backup your entirely your website through and incremental copy and making a daily tarball. To preserve the space disk and avoid useless backups, the oldest backups (e.g: older than 30days) will be erased at the end of the batch.It is also possible to make a dump of your database (MySql).

Prerequisites :

To be able to join the remote server and copy you have to be connected via ssh without having to key any password, you have to generate a couple key without passphrase to avoid password identification.

  • ssh-keygen -t dsa; no passphrase
  • ssh-copy-id -i ~/.ssh/id_dsa.pub root@host
  1. This script is using rsync so rsync has to be installed on the remote server: apt-get install rsync

How to :

There aro some variables in bachup.sh that you have to set up :

  • set SITE (this is the global path of your website)
  • set sitename (this is the name's directory to backup)
  • set bdd_name
  • Fill on your remote server the data base information: vi /root/.my.cnf
  • set datelimit to clean the oldest backups

Usage:

  • $PROGNAME [-s] "login@host" [-d|--dest] "/dir/to/save"
  • $PROGNAME [-b] [-s] "login@host" [-d|--dest] "/dir/to/save"

Cron

This may useful to put this script as cron task : 20 07 * * 1 /path/backup.sh -b -s root@remotehost -d /local/path/to/save/ #mysqldump 22 07 * * 1 /path/to/backup.sh -s root@remotehost -d /local/path/to/save/ #backup your website

About

script bash which makes a local backup of your entire website through ssh

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages