Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Backup using compression and rsync

General questions about VestaCP
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
Neso
Posts: 5
Joined: Thu Mar 06, 2014 10:59 am

Backup using compression and rsync
  • Quote

Post by Neso » Thu Mar 06, 2014 11:11 am

Hi,
thanks for the great CP!

Would it be possible, to add compression and rsync to the backup script? Right now I have made a script myself to rsync /backup directory to remote server every morning at 7:30 via cron but would love to have it built-in not hack it to every server :)

If anyone needs it, here is my very simple script:

Code: Select all

#!/bin/bash


# BEGIN CONFIGURATION ==========================================================

BACKUP_DIR="/backup"  # The directory in which you want backups placed
SYNC="rsync"
RSYNC_USER="username"
RSYNC_SERVER="xxx.xxx.xxx.xxx"
RSYNC_DIR="/remote/dir/$HOSTNAME/"
RSYNC_PORT="22" # Change this if you've customized the SSH port of your backup system
# You probably won't have to change these
THE_DATE="$(date '+%Y-%m-%d')"

RSYNC_PATH="$(which rsync)"

# END CONFIGURATION ============================================================

# Announce the backup time
echo "Backup Started: $(date)"

# Rsync everything with another server
echo "------------------------------------"
echo "Sending backups to backup server..."
$RSYNC_PATH --del --progress -vaze "ssh -p $RSYNC_PORT" $BACKUP_DIR/ $RSYNC_USER@$RSYNC_SERVER:$RSYNC_DIR

# Announce the completion time
echo "------------------------------------"
echo "Backup Completed: $(date)"
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password