MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

SVN admin project to backup and restore the svn repo

SVN(Subversion)

rajeshkumar created the topic: SVN admin project to backup and restore the svn repo
Write a shell scripting using swtich case with the following options.
1. Create a repo. Repo name should be entered by user
2. Take a full dump
3. Incremental backup. user need to entered the revsion nujmber
4. Restore the dump to the location which has been entered by the user
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

sribhavani_u replied the topic: SVN admin project to backup and restore the svn repo
#!/bin/bash
#Write a shell scripting using swtich case with the following options.
#1. Create a repo. Repo name should be entered by user
#2. Take a full dump
#3. Incremental backup. user need to enter the revision number
#4. Restore the dump to the location which has been entered by the user
while true
do
echo “1. Create a repo.”
echo “2. Take a full dump”
echo “3. Incremental backup.”
echo “4. Restore the dump”
echo “Enter a number for choosing the option:”
read num
case $num in
1) echo “repo name:”
read name
mkdir -p /usr/src/svn/$name
svnadmin create –fs-type fsfs /usr/src/svn/$name
echo “repo $name created” ;;
2) svnadmin dump /usr/src/svn/$name –revision 0:HEAD > $name.dump
echo “$name.dump file created” ;;
3) echo “give revision number”
read rev
svnadmin dump /usr/src/svn/$name –revision $rev:HEAD –incremental > $name-$rev.dump
echo “incremental dump done” ;;
4) echo “give the location to where the dump should be restored”
read loc
svnadmin load $loc < $name.dump echo "dump restored" ;; *) echo "INVALID OPTION" exit ;; esac done rajeshkumar replied the topic: SVN admin project to backup and restore the svn repo
#!/bin/bash
#Write a shell scripting using swtich case with the following options.
#1. Create a repo. Repo name should be entered by user
#2. Take a full dump
#3. Incremental backup. user need to enter the revision number
#4. Restore the dump to the location which has been entered by the user
while true
do
echo “1. Create a repo.”
echo “2. Take a full dump”
echo “3. Incremental backup.”
echo “4. Restore the dump”
echo “Enter a number for choosing the option:”
read num
case $num in
1) echo “repo name:”
read name
mkdir -p /usr/src/svn/$name
svnadmin create –fs-type fsfs /usr/src/svn/$name
echo “repo $name created” ;;
2) svnadmin dump /usr/src/svn/$name –revision 0:HEAD > $name.dump
echo “$name.dump file created” ;;
3) echo “give revision number”
read rev
svnadmin dump /usr/src/svn/$name –revision $rev:HEAD –incremental > $name-$rev.dump
echo “incremental dump done” ;;
4) echo “give the location to where the dump should be restored”
read loc
svnadmin load $loc < $name.dump echo "dump restored" ;; *) echo "INVALID OPTION" exit ;; esac done Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x