SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
rdiff-backup fails, no gzipped file
Author Message
Post rdiff-backup fails, no gzipped file 
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running? How?

Since rdiff-backup does not like backup interruptions (and therefore is not usable on slow or unreliable connections) I rdiff to a local repository on the server (the server usually doesn't reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use htop
of course, but I am not sure if rdiff-backup is runnin also local on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ] && echo "running" ||
echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C rdiff-backup"
2>/dev/null`" ] && echo "running" || echo "not running"


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running? How?

Since rdiff-backup does not like backup interruptions (and therefore
is not usable on slow or unreliable connections) I rdiff to a local
repository on the server (the server usually doesn't reboot) and
rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use htop
of course, but I am not sure if rdiff-backup is runnin also local on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ] && echo "running" ||
echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C rdiff-backup"
2>/dev/null`" ] && echo "running" || echo "not running"

Ah Thanks! So it should be possible to make some script which checks if
it's is running, if no, shutdown, if yes, wait 15 minuts and check again
etc... right?

~D

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 07/12/10 18:54, ~D wrote:
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running?
How?

Since rdiff-backup does not like backup interruptions (and
therefore is not usable on slow or unreliable connections) I rdiff
to a local repository on the server (the server usually doesn't
reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my
laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use htop
of course, but I am not sure if rdiff-backup is runnin also local on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ] && echo "running"
|| echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C
rdiff-backup" 2>/dev/null`" ] && echo "running" || echo "not running" .

Ah Thanks! So it should be possible to make some script which checks
if it's is running, if no, shutdown, if yes, wait 15 minuts and check
again etc... right?

~D

yes you could write a bash script and put it as a job in your crontab to
run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by a
script which uses rdiff. The script runs on the primary and starts by
waking up the mirror server (over the internet), then runs rsync, then
after checking all is well, powers down the mirror. Works well with
rsync - as David pointed out earlier, it is not a good idea to run
rdiff-backup over an unstable connection.

Dominic

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 12/07/2010 09:33 PM, Dominic Raferd wrote:


On 07/12/10 18:54, ~D wrote:
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running?
How?

Since rdiff-backup does not like backup interruptions (and
therefore is not usable on slow or unreliable connections) I rdiff
to a local repository on the server (the server usually doesn't
reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my
laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use
htop
of course, but I am not sure if rdiff-backup is runnin also local
on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ] && echo "running"
|| echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C
rdiff-backup" 2>/dev/null`" ] && echo "running" || echo "not running" .

Ah Thanks! So it should be possible to make some script which checks
if it's is running, if no, shutdown, if yes, wait 15 minuts and check
again etc... right?

~D

yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror. Works well
with rsync - as David pointed out earlier, it is not a good idea to
run rdiff-backup over an unstable connection.
I was thinking about a script on my laptop for shutdown my machine,
instead of running sudo shutdown -h now, run a script which only make
the laptop shutdown when rdiff-backup is not runnning.

I'm using fluxbox, so I'm used to shutdown my machine via terminal.

~D

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 07/12/2010 22:40, ~D wrote:
On 12/07/2010 09:33 PM, Dominic Raferd wrote:

On 07/12/10 18:54, ~D wrote:
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running?
How?

Since rdiff-backup does not like backup interruptions (and
therefore is not usable on slow or unreliable connections) I rdiff
to a local repository on the server (the server usually doesn't
reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my
laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use
htop
of course, but I am not sure if rdiff-backup is runnin also local
on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ]&& echo "running"
|| echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C
rdiff-backup" 2>/dev/null`" ]&& echo "running" || echo "not running" .
Ah Thanks! So it should be possible to make some script which checks
if it's is running, if no, shutdown, if yes, wait 15 minuts and check
again etc... right?

~D

yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror. Works well
with rsync - as David pointed out earlier, it is not a good idea to
run rdiff-backup over an unstable connection.
I was thinking about a script on my laptop for shutdown my machine,
instead of running sudo shutdown -h now, run a script which only make
the laptop shutdown when rdiff-backup is not runnning.

I'm using fluxbox, so I'm used to shutdown my machine via terminal.

~D

Here's a script 'auto-shutdown.sh' I use which shuts down a machine if
there is no ssh connection and certain other programs are not running:

if [ -z "`netstat -t|grep :ssh.*ESTABLISHED$`" ]; then
[ "`ps -A|grep -Ec "cp$|rsync$|mv$|rm$"`" = "0" ] && shutdown -h now
fi

add a line to /etc/crontab thus, to run the script hourly:
01 * * * * root /opt/auto-shutdown.sh


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 12/08/2010 11:01 AM, Dominic Raferd wrote:
On 07/12/2010 22:40, ~D wrote:
On 12/07/2010 09:33 PM, Dominic Raferd wrote:

On 07/12/10 18:54, ~D wrote:
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running?
How?

Since rdiff-backup does not like backup interruptions (and
therefore is not usable on slow or unreliable connections) I rdiff
to a local repository on the server (the server usually doesn't
reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my
laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use
htop
of course, but I am not sure if rdiff-backup is runnin also local
on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ]&& echo "running"
|| echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C
rdiff-backup" 2>/dev/null`" ]&& echo "running" || echo "not
running" .
Ah Thanks! So it should be possible to make some script which checks
if it's is running, if no, shutdown, if yes, wait 15 minuts and check
again etc... right?

~D

yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror. Works well
with rsync - as David pointed out earlier, it is not a good idea to
run rdiff-backup over an unstable connection.
I was thinking about a script on my laptop for shutdown my machine,
instead of running sudo shutdown -h now, run a script which only make
the laptop shutdown when rdiff-backup is not runnning.

I'm using fluxbox, so I'm used to shutdown my machine via terminal.

~D

Here's a script 'auto-shutdown.sh' I use which shuts down a machine if
there is no ssh connection and certain other programs are not running:

if [ -z "`netstat -t|grep :ssh.*ESTABLISHED$`" ]; then
[ "`ps -A|grep -Ec "cp$|rsync$|mv$|rm$"`" = "0" ] && shutdown -h now
fi

add a line to /etc/crontab thus, to run the script hourly:
01 * * * * root /opt/auto-shutdown.sh


I made this script to be sure it only shuts down when rdiff-backup isn't
running:


#!/bin/bash

while true;
do if pgrep rdiff-backup > /dev/null; then sleep 10;
else
shutdown -h now;
fi;
done


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 12/08/2010 11:01 AM, Dominic Raferd wrote:
On 07/12/2010 22:40, ~D wrote:
On 12/07/2010 09:33 PM, Dominic Raferd wrote:

On 07/12/10 18:54, ~D wrote:
On 12/07/2010 05:09 PM, Dominic Raferd wrote:
On 07/12/2010 14:42, ~D wrote:
On 12/07/2010 03:26 PM, D. Kriesel wrote:
Do you prevent a shutdown or reboot when rdiff-backup is running?
How?

Since rdiff-backup does not like backup interruptions (and
therefore is not usable on slow or unreliable connections) I rdiff
to a local repository on the server (the server usually doesn't
reboot) and rsync the entire repository to the remote destination.

My backup only runs when there is a internet connection. I use my
laptop
at home most of the time. I have to find a way to check wether
rdiff-backup is running and to reboot after it shutdown. I can use
htop
of course, but I am not sure if rdiff-backup is runnin also local
on my
laptop or only on my server.

Maybe there is a more advanced way to do this?
You can test for running rdiff-backup locally thus:

[ -n "`ps -o pid --no-heading -C rdiff-backup`" ]&& echo "running"
|| echo "not running"

and you can query remote server thus:

[ -n "`ssh user < at > remote.server "ps -o pid --no-heading -C
rdiff-backup" 2>/dev/null`" ]&& echo "running" || echo "not
running" .
Ah Thanks! So it should be possible to make some script which checks
if it's is running, if no, shutdown, if yes, wait 15 minuts and check
again etc... right?

~D

yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror.

Hmm I just have a small NAS server (qnap 109), no 'mirror backup
server' here.

What do you mean by 'waking up the mirror server'?

~D


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror.

Hmm I just have a small NAS server (qnap 109), no 'mirror backup
server' here.

What do you mean by 'waking up the mirror server'?

~D Wiki

Well our main backup is done by all our machines to a server on our LAN
using rdiff-backup - this I call the 'primary' backup server. Then each
night this primary machine runs a script which uses rsync to copy its
contents to an offsite machine, which therefore is maintained as a
'mirror' of the primary.

The mirror machine is normally switched off. To switch it on, the script
sends a 'magic packet' to the mirror machine, thus turning it on. Then
the script runs rsync, and when that is over, it shuts the mirror
machine down again.

In a simple case, you can use the wakonlan utility to wake the remote
machine: see http://gsd.di.uminho.pt/jpo/software/wakeonlan/. If it
isn't already available on your machine and you use Debian or Ubuntu you
can add it with apt-get I think. If the remote machine is behind another
router then waking it may be more complicated: I have a special script
to pass through Netgear DG834G router, for example (see
http://www.timedicer.co.uk/dg834g.)

Dominic

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Post rdiff-backup fails, no gzipped file 
On 12/11/2010 01:37 PM, Dominic Raferd wrote:

yes you could write a bash script and put it as a job in your crontab
to run every 15 minutes, say...

My mirror backup server (not my primary) is updated from my
primary by
a script which uses rdiff. The script runs on the primary and starts
by waking up the mirror server (over the internet), then runs rsync,
then after checking all is well, powers down the mirror.

Hmm I just have a small NAS server (qnap 109), no 'mirror backup
server' here.

What do you mean by 'waking up the mirror server'?

~D Wiki

Well our main backup is done by all our machines to a server on our
LAN using rdiff-backup - this I call the 'primary' backup server. Then
each night this primary machine runs a script which uses rsync to copy
its contents to an offsite machine, which therefore is maintained as a
'mirror' of the primary.

The mirror machine is normally switched off. To switch it on, the
script sends a 'magic packet' to the mirror machine, thus turning it
on. Then the script runs rsync, and when that is over, it shuts the
mirror machine down again.

In a simple case, you can use the wakonlan utility to wake the remote
machine: see http://gsd.di.uminho.pt/jpo/software/wakeonlan/. If it
isn't already available on your machine and you use Debian or Ubuntu
you can add it with apt-get I think. If the remote machine is behind
another router then waking it may be more complicated: I have a
special script to pass through Netgear DG834G router, for example (see
http://www.timedicer.co.uk/dg834g.)

Sounds like a professional setup, advanced and interesting, thanks for info.

For now I keep it the way I have Smile

~D

_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

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