SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
how to make remote lvm snapshot?
Author Message
Post how to make remote lvm snapshot? 
hi:
i am using rdiff-backup to backup all our linux machines. i want to
try rsnapshot because it has better version
controls(daily,weekly,monthly). i found rsnapshot has some lvm support
but it seems limited to local host. when i use rdiff-backup, i can let
remote machines to flush mysql database and do a lvm snapshot, then
backup the snapshot. but i can not find a clear way to do this with
rsnapshot.
the tricks of rdiff-backup is like below:

in remote machine, edit "authorized_keys" like:
command="/share/bin/rdiff-init.sh",no-port-forwarding,no-X11-forwarding,no-pty
ssh-rsa AAAB3NzaC1yc2EAAA......

and create "rdiff-init.sh" like:

echo 'flush tables with read lock; system lvcreate -L5G -s -n backup
/dev/rootvg/root;' | mysql -urdiff-backup -prdiff-backup &>/dev/null
|| exit 1
mount -onouuid,ro /dev/rootvg/backup /mnt/backup &>/dev/null || exit 1
chroot /mnt/backup rdiff-backup --server --restrict-read-only /
umount /mnt/backup &>/dev/null
lvremove -f /dev/rootvg/backup &>/dev/null

i can not use the same trick with rsnapshot because rsnapshot will
pass parameters to remote rsync.
is there any better way i can do for remote lvm snapshot?
thank a lot for help!!

Regards,
tbskyd

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post how to make remote lvm snapshot? 
On Wed, 2008-10-29 at 14:03 +0800, d tbsky wrote:

i can not use the same trick with rsnapshot because rsnapshot will
pass parameters to remote rsync.
is there any better way i can do for remote lvm snapshot?
thank a lot for help!!

In the rsync release that is on Ubuntu's Intrepid right now there is a
script in /usr/share/doc/rsync/scripts/rrsync.gz that you can plug into
ssh's authorized_keys file that takes the parameters given to it to
start the --server side. I think you could use that to figure out
what's being backed up and take your snapshots.

Please post back here what you figure out.

b.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post how to make remote lvm snapshot? 
2008/10/30 Brian J. Murrell <brian < at > interlinx.bc.ca>:
On Wed, 2008-10-29 at 14:03 +0800, d tbsky wrote:

i can not use the same trick with rsnapshot because rsnapshot will
pass parameters to remote rsync.
is there any better way i can do for remote lvm snapshot?
thank a lot for help!!

In the rsync release that is on Ubuntu's Intrepid right now there is a
script in /usr/share/doc/rsync/scripts/rrsync.gz that you can plug into
ssh's authorized_keys file that takes the parameters given to it to
start the --server side. I think you could use that to figure out
what's being backed up and take your snapshots.

Please post back here what you figure out.



hi:
i checked that script and i found the original ssh command will be
preserved at the "SSH_ORIGINAL_COMMAND" environment variable. so in
theory it can pass the rsync parameters to remote side.
i will try it when i have time.
thanks a lot for the information Smile

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Re: how to make remote lvm snapshot? 
hi:
i am using rdiff-backup to backup all our linux machines. i want to
try rsnapshot because it has better version
controls(daily,weekly,monthly). i found rsnapshot has some lvm support
but it seems limited to local host. when i use rdiff-backup, i can let
remote machines to flush mysql database and do a lvm snapshot, then
backup the snapshot. but i can not find a clear way to do this with
rsnapshot.
the tricks of rdiff-backup is like below:

in remote machine, edit "authorized_keys" like:
command="/share/bin/rdiff-init.sh",no-port-forwarding,no-X11-forwarding,no-pty
ssh-rsa AAAB3NzaC1yc2EAAA......

and create "rdiff-init.sh" like:

echo 'flush tables with read lock; system lvcreate -L5G -s -n backup
/dev/rootvg/root;' | mysql -urdiff-backup -prdiff-backup &>/dev/null
|| exit 1
mount -onouuid,ro /dev/rootvg/backup /mnt/backup &>/dev/null || exit 1
chroot /mnt/backup rdiff-backup --server --restrict-read-only /
umount /mnt/backup &>/dev/null
lvremove -f /dev/rootvg/backup &>/dev/null

i can not use the same trick with rsnapshot because rsnapshot will
pass parameters to remote rsync.
is there any better way i can do for remote lvm snapshot?
thank a lot for help!!

Regards,
tbskyd

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________

Can tell me how to make remote lvm snapshot? thank you !



rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB