Hello
I am trying to set a backup up solution for my sites : I have through aegir interface opted for a daily backup for the sites that are updated with content daily.
I am using a script that sends my backup folder to another sever (http://www.dansteph.com/backupftp.php) . I am right now thinking about the cron, how to set it in order to have only fresh backups and sends them every night. I was thinking about :

  1. Deleting old backups using this script : http://drupalcode.org/project/octopus.git/blob/HEAD:/aegir/tools/system/...
  2. Create a new backup of the sites : using drush ??? I am not sure
  3. send the whole compressed file using the mybackup script

I am not sure about the second step how to insert it in a shell. Having the ability to set the exact time of backups on Aegir UI would have helped otherwise.

Thanks for any suggestion
Yaz

Comments

yazzou’s picture

Status: Active » Fixed

I found a solution for sending my drupal backups to another server.It is not the one i have been thinking about but it works well. Three crons :

  • One for backing up drupal site (UI with aegir) around mid night
  • One cron for sending the backups to the other server using my custom script around 4 AM
  • One cron for cleaning the backup folder (empty it) around 10 AM

This way i have daily backups of the sites.

I will mark this issue as fixed then. Thanks for reading me.
Yazzou

wickwood’s picture

Is it possible for you to post in more detail how you did this along with the scripts you used?

If you can do this, it might be better to post it in the BOA group at http://groups.drupal.org/boa

Thanks in advance!

Steve

yazzou’s picture

Well I have posted here because i am using Aegir installed with Octopus. It is three steps :

You first need to enable in "youraegir.com/admin/hosting" (experimental section ), the following :

  • Backup scheduling/queue
  • Task garbage collection

Schedule a backup everyday for the site you want to be saved everyday at 12 PM.

You then need to send the tar files in the backup server. I am using this script http://www.dansteph.com/backupftp.php for sending my backup folder (/var/data/disk/octopususer/backups)

Then to make sure no duplicate backups are sent every night you just set a cron of shell script morning :

#!/bin/bash

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

find /var/data/disk/*/backups/* -type f -exec rm -rf {} \;

# email subject
SUBJECT="Nettoyage des backups"
# Email To ?
EMAIL="mymail@gmail.com"
# Email text/message
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "Le nettoyage des backups a bien été effectué"> $EMAILMESSAGE
# send an email using /bin/mail
mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
 
###EOF2013###

You can alternatively use Task garbage collection to do the job, but i found it quite confusing...

I hope that helps

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.