Results 1 to 6 of 6

Thread: automatically run on logout/shutdown/suspend?

  1. #1
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,294
    Blog Entries
    1

    Default automatically run on logout/shutdown/suspend?

    I have a laptop running openSUSE 11 which I want to be able to automatically rsynch (unless you know of something better) to a certain directory on the home server when it is being shutdown or logged out.

    If it can work before being suspended to disk that would be great, but not required.

    The alternative is to have it auto rsynch (when it's connected to the network) when booting up I guess, but will this also occur when returning from being suspended to disk?

    Are there any pro's or con's to this approach?

  2. #2
    ab@novell.com NNTP User

    Default Re: automatically run on logout/shutdown/suspend?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Well there are definitely some things to consider. For example, does
    the rsync continue to retry over and over if you shutdown where the
    network doesn't cooperate? If you have a lot to save does it take as
    long as necessary for that while your laptop is cooking itself in your
    backpack? If you have a low battery do you want it to do this at that time?

    I would probably do something like create a script that kicks off the
    rsync and, when done, shuts down and then use that one full time UNLESS
    you wanted to simply go down. Doing the rsync actions on the way back
    up may be nicer but it means anything updated on your laptop will not be
    usable until you boot it again so, again, backing up often may be useful
    or backing up on purpose before shutting down.

    Good luck.





    dragonbite wrote:
    | I have a laptop running openSUSE 11 which I want to be able to
    | automatically rsynch (unless you know of something better) to a certain
    | directory on the home server when it is being shutdown or logged out.
    |
    | If it can work before being suspended to disk that would be great, but
    | not required.
    |
    | The alternative is to have it auto rsynch (when it's connected to the
    | network) when booting up I guess, but will this also occur when
    | returning from being suspended to disk?
    |
    | Are there any pro's or con's to this approach?
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIj1xz3s42bA80+9kRAqlXAJ9EZZaroZDxkoHVwRnSWqsNC9IdFACZAcpo
    8ofhfY47yvHEf5MfDshUWxI=
    =/0tX
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Jun 2008
    Location
    Freiburg, Germany
    Posts
    32

    Default Re: automatically run on logout/shutdown/suspend?

    I guess that it might be better to rsync after login for the following reasons:

    1) I don't know about the amount of data you want to rsync, but if a lot changed it might take some time and if i want to shut down the computer, i want it to shut down and not spending minutes syncing data.

    2) When syncing on startup, you have the most actual data on your machine for this session, if something changed on the homeserver (or do you just want to backup your notebook?)

    Either way: i would write a script, which is executed on the chosen event.

  4. #4
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,294
    Blog Entries
    1

    Default Re: automatically run on logout/shutdown/suspend?

    Thanks guys, this i making me think through this process a little more.

    Due to the disconnected possibility of the laptop as well as running on battery and low-battery operations I think it may work better to just do a script that I can manually run myself before shutting down or after booting up and before doing anything.

    Now on a desktop, that may be different.

    Theoretically if it rsynchs down to the server at shutdown, and rsynchs back to the desktop from the server at bootup then there will be a constant-flow backup on the server at all times.

    The only question, then, would be whether or not those files are accessible from the server and can be modified? If they are being modified while the desktop is in use then those changes would be gone, otherwise it would rsynch up the latest version when the desktop boots up.

    A desktop is more likely to be connected and doesn't have the battery issue laptops do, but I wonder what other issues may come into play.

    One thing, though, is that I don't know how long rsynch takes after the initial run of course. My email is IMAP so at least I don't have to worry about if I am emailed a huge attachment (or maybe I do.. I'm not sure about IMAP).

  5. #5
    ab@novell.com NNTP User

    Default Re: automatically run on logout/shutdown/suspend?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Other considerations.... desktops are usually wired and, ceteris
    paribus, will have a faster connection. They also don't move around as
    often so they will usually has the same faster connection anytime needed
    where a laptop may have a bad connection from your home, or the library,
    or whatever. Desktops are also usually faster for the same price.

    rsync can do incremental/differential backups as I recall so that should
    help in any case.

    Good luck.





    dragonbite wrote:
    | Thanks guys, this i making me think through this process a little more.
    |
    | Due to the disconnected possibility of the laptop as well as running on
    | battery and low-battery operations I think it may work better to just do
    | a script that I can manually run myself before shutting down or after
    | booting up and before doing anything.
    |
    | Now on a desktop, that may be different.
    |
    | Theoretically if it rsynchs down to the server at shutdown, and rsynchs
    | back to the desktop from the server at bootup then there will be a
    | constant-flow backup on the server at all times.
    |
    | The only question, then, would be whether or not those files are
    | accessible from the server and can be modified? If they are being
    | modified while the desktop is in use then those changes would be gone,
    | otherwise it would rsynch up the latest version when the desktop boots
    | up.
    |
    | A desktop is more likely to be connected and doesn't have the battery
    | issue laptops do, but I wonder what other issues may come into play.
    |
    | One thing, though, is that I don't know how long rsynch takes after the
    | initial run of course. My email is IMAP so at least I don't have to
    | worry about if I am emailed a huge attachment (or maybe I do.. I'm not
    | sure about IMAP).
    |
    |
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIkJVL3s42bA80+9kRAgo8AJ9YHOwVT9WtgDZjL4e//LIA9YWs5QCgii1P
    Z2pgdYacHAS8kxZJdYbRUBw=
    =U8Xf
    -----END PGP SIGNATURE-----

  6. #6
    Rikishi 42 NNTP User

    Default Re: automatically run on logout/shutdown/suspend?

    On 2008-07-30, dragonbite <dragonbite@no-mx.forums.opensuse.org> wrote:

    > Thanks guys, this i making me think through this process a little more.
    >
    > Due to the disconnected possibility of the laptop as well as running on
    > battery and low-battery operations I think it may work better to just do
    > a script that I can manually run myself before shutting down or after
    > booting up and before doing anything.


    Why not make a script that runs your backup and THEN shuts down?

    You'd be able to chose.



    --
    The sand remembers once there was beach and sunshine
    but chip is warm too
    -- haiku from Effector Online, Volume 1, Number 6

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •