Quantcast
Channel: Umarani - Pay it forward...!
Viewing all articles
Browse latest Browse all 99

Backup Shell Script for Drupal (Linux OS)

$
0
0

#!/bin/sh
####################################
#
# Drupal Backup script.
#
####################################

# What to backup.
backup_files="/var/www/myfolder"

# Where to backup to.
dest="/home/backup_myfolder/files"

# Create archive filename.
day=$(date +%m-%d-%Y)
archive_file="myfolder-$day.tgz"

# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo

# Backup the files using tar.
tar czf $dest/$archive_file $backup_files


Viewing all articles
Browse latest Browse all 99

Trending Articles