can rdiff-backup be stopped / paused / restarted? - HOWTO?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

can rdiff-backup be stopped / paused / restarted? - HOWTO?

Lexje
Hi Everybody,

I'm completely new to rdiff-backup.
I'm trying to backup a complete server over the internet.
Is it possible to pause, stop / restart rdiff-backup? (To free up / respect bandwith limitations)

What happens if I just ctrl-c the process, and then restart the process? Will it resume?

Are there ways to have rdiff-backup start / stop at HH:MM (cron? scrip?)

Thanks for your valuable answers!

Erwin
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Andreas Olsson-4
On Sunday 13 January 2008 15:13:30 Lexje wrote:
> I'm trying to backup a complete server over the internet.
> Is it possible to pause, stop / restart rdiff-backup? (To free up / respect
> bandwith limitations)
>
> What happens if I just ctrl-c the process, and then restart the process?
> Will it resume?

No, I'm afraid that approach won't work. If you abort rdiff-backup halfway
you'll simply end up with a broken repository on the destination.

If this happens on the first backup you'll simply have to remove/empty your
destination directory and begin from scratch. If you abort a backup to an
existing repository your next run will start by calling an
automatic --check-destination-dir, which will return your repository to the
state it was in before your interrupted transfer. In none of the cases the
interrupted transfer will have done you any good.

What you can try, if you have enough free space, is to run rdiff-backup
against a local destination and then rsync the repository to its remote
location.  Rsync you can always trust to resume properly :-)

Feel free to take a look at this page in the wiki. It also provides a script
which wraps rdiff-backup and rsync into one.

http://wiki.rdiff-backup.org/wiki/index.php/BackupUpOnUnreliableLink

--
Andreas Olsson
http://www.andreasolsson.se/

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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Lexje
Thanks a lot, for your tip.
Are you aware of any similar method that would allow scheduling and resume?

Erwin

Andreas Olsson-4 wrote
On Sunday 13 January 2008 15:13:30 Lexje wrote:
> I'm trying to backup a complete server over the internet.
> Is it possible to pause, stop / restart rdiff-backup? (To free up / respect
> bandwith limitations)
>
> What happens if I just ctrl-c the process, and then restart the process?
> Will it resume?

No, I'm afraid that approach won't work. If you abort rdiff-backup halfway
you'll simply end up with a broken repository on the destination.

If this happens on the first backup you'll simply have to remove/empty your
destination directory and begin from scratch. If you abort a backup to an
existing repository your next run will start by calling an
automatic --check-destination-dir, which will return your repository to the
state it was in before your interrupted transfer. In none of the cases the
interrupted transfer will have done you any good.

What you can try, if you have enough free space, is to run rdiff-backup
against a local destination and then rsync the repository to its remote
location.  Rsync you can always trust to resume properly :-)

Feel free to take a look at this page in the wiki. It also provides a script
which wraps rdiff-backup and rsync into one.

http://wiki.rdiff-backup.org/wiki/index.php/BackupUpOnUnreliableLink

--
Andreas Olsson
http://www.andreasolsson.se/

 
_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Dave Kempe
In reply to this post by Lexje
Lexje wrote:
> I'm completely new to rdiff-backup.
> I'm trying to backup a complete server over the internet.
> Is it possible to pause, stop / restart rdiff-backup? (To free up / respect
> bandwith limitations)

You could do a Ctrl-Z and then start it again with fg
you could use screen as well

dave


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Roland Kletzing
In reply to this post by Lexje
> > What happens if I just ctrl-c the process, and then restart the process?
> > Will it resume?

no - but you may try ctrl-z instead.

this suspends the foreground process.  you can put it running into background with "bg" or get it back into foreground with "fg".
may depend on the shell you are using - if unsure try this with a bash

you can also send a signal with "kill -STOP <pid>" and continue with "kill -CONT <pid>"

but be careful - use at own risk and don`t suspend for too long, because your tcp session would timeout....
when rdiff-backup is really cancelled while running there is no return and rdiff-backup will need to recover first on the next run......

regards
roland



> -----Ursprüngliche Nachricht-----
> Von: "Andreas Olsson" <[hidden email]>
> Gesendet: 13.01.08 23:47:34
> An: [hidden email]
> Betreff: Re: [rdiff-backup-users] can rdiff-backup be stopped / paused / restarted? - HOWTO?


>
> On Sunday 13 January 2008 15:13:30 Lexje wrote:
> > I'm trying to backup a complete server over the internet.
> > Is it possible to pause, stop / restart rdiff-backup? (To free up / respect
> > bandwith limitations)
> >
> > What happens if I just ctrl-c the process, and then restart the process?
> > Will it resume?
>
> No, I'm afraid that approach won't work. If you abort rdiff-backup halfway
> you'll simply end up with a broken repository on the destination.
>
> If this happens on the first backup you'll simply have to remove/empty your
> destination directory and begin from scratch. If you abort a backup to an
> existing repository your next run will start by calling an
> automatic --check-destination-dir, which will return your repository to the
> state it was in before your interrupted transfer. In none of the cases the
> interrupted transfer will have done you any good.
>
> What you can try, if you have enough free space, is to run rdiff-backup
> against a local destination and then rsync the repository to its remote
> location.  Rsync you can always trust to resume properly :-)
>
> Feel free to take a look at this page in the wiki. It also provides a script
> which wraps rdiff-backup and rsync into one.
>
> http://wiki.rdiff-backup.org/wiki/index.php/BackupUpOnUnreliableLink
>
> --
> Andreas Olsson
> http://www.andreasolsson.se/
>
>
> <hr>
> _______________________________________________
> rdiff-backup-users mailing list at [hidden email]
> http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>


__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
Mehr Infos unter http://produkte.web.de/club/?mc=021131



_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Erwin Panen-2
In reply to this post by Dave Kempe
Thanks Dave,

Could you be a little more specific?
What do you mean with fg?
Screen?

Thank you,

Erwin

Dave Kempe wrote:

> Lexje wrote:
>> I'm completely new to rdiff-backup.
>> I'm trying to backup a complete server over the internet. Is it
>> possible to pause, stop / restart rdiff-backup? (To free up / respect
>> bandwith limitations)
>
> You could do a Ctrl-Z and then start it again with fg
> you could use screen as well
>
> dave


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Andreas Olsson-4
In reply to this post by Lexje
On Sunday 13 January 2008 23:50:56 Lexje wrote:
> Thanks a lot, for your tip.
> Are you aware of any similar method that would allow scheduling and resume?

Well, I'm not sure if I have any elegant or good solution. What should work
thought is to have cron run scripts which will first start and then later
brutally kill your rsync-process.

// Andreas


>
> Andreas Olsson-4 wrote:
> > On Sunday 13 January 2008 15:13:30 Lexje wrote:
> >> I'm trying to backup a complete server over the internet.
> >> Is it possible to pause, stop / restart rdiff-backup? (To free up /
> >> respect
> >> bandwith limitations)
> >>
> >> What happens if I just ctrl-c the process, and then restart the process?
> >> Will it resume?
> >
> > No, I'm afraid that approach won't work. If you abort rdiff-backup
> > halfway you'll simply end up with a broken repository on the destination.
> >
> > If this happens on the first backup you'll simply have to remove/empty
> > your
> > destination directory and begin from scratch. If you abort a backup to an
> > existing repository your next run will start by calling an
> > automatic --check-destination-dir, which will return your repository to
> > the
> > state it was in before your interrupted transfer. In none of the cases
> > the interrupted transfer will have done you any good.
> >
> > What you can try, if you have enough free space, is to run rdiff-backup
> > against a local destination and then rsync the repository to its remote
> > location.  Rsync you can always trust to resume properly :-)
> >
> > Feel free to take a look at this page in the wiki. It also provides a
> > script
> > which wraps rdiff-backup and rsync into one.
> >
> > http://wiki.rdiff-backup.org/wiki/index.php/BackupUpOnUnreliableLink
> >
> > --
> > Andreas Olsson
> > http://www.andreasolsson.se/
> >
> >
> > _______________________________________________
> > rdiff-backup-users mailing list at [hidden email]
> > http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> > Wiki URL:
> > http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

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

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Maarten Bezemer
In reply to this post by Roland Kletzing

On Sun, 13 Jan 2008 [hidden email] wrote:

> when rdiff-backup is really cancelled while running there is no return
> and rdiff-backup will need to recover first on the next run......

Although I can understand why it is done this way, I'm not entirely
convinced that it can't be done differently.
I mean: resume isn't considered the Right Thing because rdiff-backup is
supposed to be a 'snapshot' at 1 point in time. But in practice, if you
have slow links or a lot of stuff to back up, the data backed up at the
end of the run may be from a much later time than the data backup up at
the beginning of that run. This wouldn't be much different from starting a
backup, network link breaking, and resuming 5 minutes later.
Yet, this isn't supported... :-(

Not knowing the python code very well, I'm not sure if saving checkpoint
data in the exception handler is feasible. Same goes for reading
checkpoint data and continuing from that point. Would be nice to have, but
I'm not expecting anything like this to happen before we get
increment-merging ;-)

--
Maarten



_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

gart algar
In reply to this post by Erwin Panen-2
Hello,
Erwin Panen a écrit :
> Thanks Dave,
>
> Could you be a little more specific?
> What do you mean with fg?
fg is a unix command http://pwet.fr/man/linux/commandes/posix/fg it
allow to put a process in foreground, for example after it has been
suspended (with ctrl+z)
> Screen?
screen is a usefull tool to have multiple terminal which can be detached
and reattached from anywhere (hope I'm clear, but I think I'm not :)
http://en.wikipedia.org/wiki/GNU_Screen



_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

Chris Wilson-3
In reply to this post by Maarten Bezemer
Hi Maarten and devzero,

On Mon, 14 Jan 2008, Maarten Bezemer wrote:

> On Sun, 13 Jan 2008 [hidden email] wrote:
>
> > when rdiff-backup is really cancelled while running there is no return
> > and rdiff-backup will need to recover first on the next run......
>
> Although I can understand why it is done this way, I'm not entirely
> convinced that it can't be done differently. I mean: resume isn't
> considered the Right Thing because rdiff-backup is supposed to be a
> 'snapshot' at 1 point in time. But in practice, if you have slow links
> or a lot of stuff to back up, the data backed up at the end of the run
> may be from a much later time than the data backup up at the beginning
> of that run. This wouldn't be much different from starting a backup,
> network link breaking, and resuming 5 minutes later. Yet, this isn't
> supported... :-(
>
> Not knowing the python code very well, I'm not sure if saving checkpoint
> data in the exception handler is feasible. Same goes for reading
> checkpoint data and continuing from that point. Would be nice to have,
> but I'm not expecting anything like this to happen before we get
> increment-merging ;-)

As I see it, the problem is that rdiff-backup saves increment files as it
goes along updating the remote repository. It does this in such a way that
it can undo the increments if necessary, with --check-destination-dir, but
I think it might not be able (currently) to:

* determine which increments have already been applied when restarting the
backup, and not apply them again; and

* handle the case where a file that was incremented during the last run
has subsequently changed and needs to be incremented again (merging
increments); and

* handle the case where the increments created so far do not match the log
file written so far (because the two cannot be updated atomically in
step).

These problems are not impossible to solve, but backup software is tricky
to get right and also very very important to get right, and I can
understand the authors' reluctance (so far) to try this.

In most cases, it's not actually necessary either. Careful bandwidth
management (QoS) on your Internet connection can ensure that your backups
can run for as long as necessary without needing to be interrupted and
without disturbing other traffic.

We do this at the company that I work for (I implemented it) and it works
reasonably well, although rdiff-backup has some other problems as well, so
we're looking at other solutions. So far I'm not aware of anything else
that has all the nice properties of rdiff-backup (which I really want), so
we're stuck with it (and I don't know python to fix rdiff-backup myself).

Cheers, Chris.
--
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: can rdiff-backup be stopped / paused / restarted? - HOWTO?

dean gaudet-2
In reply to this post by Dave Kempe
On Mon, 14 Jan 2008, Dave Kempe wrote:

> Lexje wrote:
> > I'm completely new to rdiff-backup.
> > I'm trying to backup a complete server over the internet. Is it possible to
> > pause, stop / restart rdiff-backup? (To free up / respect
> > bandwith limitations)
>
> You could do a Ctrl-Z and then start it again with fg
> you could use screen as well

or use kill -STOP and kill -CONT ... and pray the ssh connection isn't
dropped.

-dean


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