Please consider I'm not sys admin so I have only limited experience with the tools involved, I know there are similar question but I cannot find anything that suit my needs.
So I would like to understand what are the best precooked solution or create a simple bash script for this task. (unfortunately I'm not good on bash)
I would like to do an incremental backup of the public_html dir of my site.
The idea it to store an incremental backup on daily basis and store 1 month only (but keep the previous month):
2015-10/ -> contains a full/incremental backup of last month 2015-11/ -> contains a full/incremental backup of current month
so at begin of Dec. 2015-10 get deleted and 2015-12 get created.
I'm on a shared server with limited cli tool ( rsync/tar) and only 16gb.
I need to backup my magento site.
Since the code is hosted on
git I'm interested to keep daily backup only of the media folder ( exclude
Right now I'm using this script to create a daily backup of the media folder ( but it is not incremental )
#!/bin/bash # Daily backup script # Create some needed variable day=$(date +%F) File="/home/me/backup/files_$day.tar.gz" File_media="/home/me/backup/catalog_images_$day.tar.gz" Folder="/home/me/" Exclude_media_cache="public_html/media/catalog/product/cache" # Backup Media echo "-- Creating Catalog Image Backup ..." tar -pczf $File_media -C $Folder public_html/media/catalog --exclude="$Exclude_media_cache"