Backup system

October 18, 2008 | 4 Comments

In the Spring, our DV camera died on us. As for most electronic devices, it was not worth fixing, so we saved money and got a new Canon DV Camera and started filming show openings again for various artists. Last month, we also returned from our holidays in America with something like 2000 new pictures. For these two reasons, it was getting urgent for us to start backuping some of our data.

We went to Montgallet to see what our options were (if you’re not a Parisian but qualify as a geek, don’t miss rue Montgallet if you ever visit the City of Lights). Anyway, we ended up buying a 2-3.5 drives external case by Icy Box. The box now holds two 1 Terrabyte drives ;-) . It’s always funy to remember that my 1999 computer held a great 20 Gigabytes hard drive or something.

We backup system we decided to implement is quite simple. On sundays, our debian server sends us both an email reminding us to turn on the external backup case.

On sunday night, at 2 am, the backup starts by mounting the drives and then, using rsync, backups the rushes, photos, music and source code folders. The backup completed, the rsync logs are emailed to us. If the drives were not accessible at the time of the backup (ie we forgot to turn on the case), the email will say so and we’ll have to start the backup again, manually. Nothing fancy, but hopefully, it’ll save us the unfortunate lost of photos or movie rushes. Here is the script I came up with so far. First real run of the backup, tomorrow night. We’ll see what goes on…

1
2
3
4
#!/bin/sh
mail -s "weekly backup" <myemail>, <hisemail> << EOF
please turn on the backup drives.
EOF
1
2
3
4
5
#!/bin/sh
export now=$(date +"%Y-%m-%d")
export logPath=/var/log/rsync/rsynclogs-${now}.log
echo "########## Starting Backup Script #########" > ${logPath}
date >> ${logPath}
1
echo "########## DISK 1 ##########" >> ${logPath}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if [ -d /mnt/backup1/Rushes ] ; then
echo "no need to mount backup disk 1" >> ${logPath}
else
mount /dev/sdd1 /mnt/backup1
fi

if [ -d /mnt/backup1/Rushes ]; then
echo "starting backups for disk1" >> ${logPath}
rsync --recursive -a -v /mnt/media1/Rushes/ /mnt/backup1/Rushes/  >> ${logPath}
else
echo "FATAL!!!!! Backup of disk1 can not take place - drive is not available" >> ${logPath}
fi

# The same thing goes for the second backup drive which only holds the pictures so far.

echo "########## BACKUP COMPLETED ##########" >> ${logPath}

export content=$(cat ${logPath})
1
2
3
mail -s "weekly backup completed" ,  <<  EOF
${content}
EOF

Then I added the scripts in my cron tasks :

1
2
0       18      *       *       0       sh /<path>/rsyncbackupwarning.sh
0       1       *       *       1       sh /<path>/rsyncbackup.sh

Feel free to comment on the script so I can improve it…


Comments

4 Comments so far

  1. samantha says:

    Finally, we have a backup system for these files we care for : http://tinyurl.com/6o7dmd

  2. [...] Hard Drive: Any new board you buy now will have SATA connections for hard drives. Which is really beneficial for video editors because of the increased speed. For any kind of serious editing I would advise having new hard drives, and even duplicates for backup. Don’t put yourself through the heartbreak of loosing all your data. There is only one hard drive I recommend, it is the Seagate Barracuda. Get one of sufficient size, recently we purchased two 1 terabyte drives for backups at a very reasonable price. You can do your own research but from our experience you will find nothing more dependable. For more information on how our backup system works, check out a post in Samantha’s personal blog about Building Our Backup system. [...]

  3. [...] I use three different small backup drives as three backup volumes. I turn them on on sunday, the backup scripts runs overnight, and I turn them off on monday morning. I’ve shared the backup script in a previous post. [...]

Name (required)

Email (required)

Website

Leave a Reply