LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-02-2007, 12:39 AM   #1
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
SVN Server BAckup ?


I have written a script:
#vi /etc/cron.daily/svn-backup

[code]

#!/usr/sh
svnadmin dump --incremental /home/admin/repository > /mnt/dumped


in order to take backup daily.Its working fine.Everyday it compares the old dump file and do the replacement therein and the old one is no more.
But I want the dumped file to be in zipped form.
How can I write a script to compare the zipped file and do the backup therein consuming less space
HElp
 
Old 08-02-2007, 02:34 PM   #2
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Rep: Reputation: 16
I think you'd want something like

Code:
# svnadmin dump --incremental /home/admin/repository | gzip -c > /mnt/dumped.gz
Personally, though, I don't do that. I run a script through cron:

Code:
#!/bin/bash

NOW=`perl -e 'print time;'`
cd /var/backup/svn
mkdir $NOW
svnadmin dump /opt/repositories.svn/CC > $NOW/dumpfile.txt
tar cfpz $NOW.tgz $NOW
rm -rf $NOW
...then follow that up with another cronjob that does this:

Code:
45 3 * * * for i in `find /var/backup -type f -mtime +2` ; do rm -f $i ; done
The first cronjob does a full dump of the svn database and then zips it. (We are paranoid, we only do full dumps of databases and database-like applications.) Later on after that's complete, the nightly backup process runs and the full dump is taken as part of a daily backup to tape. The second cronjob deletes anything it finds in the /var/backup tree that's older than two days. That way I know I have two days of backups on disk, and I can restore the full database from any day I have tape for.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
anon svn read-only over apache: '.svn/entries': No such file hedpe Linux - Software 2 04-29-2009 05:31 AM
SVN Backup Script? ajeetraina Programming 2 08-02-2007 11:00 AM
Problem with svn-backup-dumps.py ????? ajeetraina Linux - Server 2 07-04-2007 11:30 PM
Remote SVN Backup Issue ajeetraina Linux - Server 4 06-29-2007 07:27 AM
Backup SVN to USB Brive BradMofo Linux - Hardware 2 09-29-2006 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration