Re: Run rsync even not connected

2012-04-12 Thread Chris Arnold
On Apr 11, 2012, at 10:48 PM, Brian K. White br...@aljex.com wrote:

 Now just run the rsync command. no nohup, no .

Just so completely understand, it should be:
rsync --options x no nohup no 
Or am I completely wrong?

Btw, Brian K. White, that looks familiar. You a member of the opensuse or 
postfix lists?
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-12 Thread Brian K. White

On 4/12/2012 12:32 PM, Chris Arnold wrote:

On Apr 11, 2012, at 10:48 PM, Brian K. Whitebr...@aljex.com  wrote:


Now just run the rsync command. no nohup, no.


Just so completely understand, it should be:
rsync --options x no nohup no
Or am I completely wrong?


No I was saying that if you were using screen, then you don't need to 
put nohup before the command and you don't need to put  after the 
command.



Btw, Brian K. White, that looks familiar. You a member of the opensuse or 
postfix lists?


Yep opensuse

--
bkw
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-12 Thread Joachim Otahal (privat)

it has not been mentioned: nohup !
screen is a bit complicated if you never used it. It only makes sense if 
you want to check back later and see life what is going on.

at or cron would be my last restort.

nohup would be my choice
nohup (you command and options) 

Example:
x@x:~ nohup ls -la 
[1] 12865
x@x:~ nohup: ignoring input and appending output to `nohup.out'
[1]+  Donenohup ls -la

You can do a tail -f on nohup.out after you started the job to see what 
it would output on the screen.


Other example:
nohup (your command and options)  log.rsync 21 
will output stdout and stderr to the log.rsync

regards,

Joachim Otahal

Chris Arnold schrieb:

I hopethis hope this makes sense. How do you make rsync run even when not 
physically connected to the server? In other words, I run rsync from the 
terminal via vnc and when I log out of the connection, rsync stops running. Is 
there a script or something I can use?

Sent from my iPhone


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-12 Thread Brian K. White


On 4/12/2012 3:36 PM, Joachim Otahal (privat) wrote:

it has not been mentioned: nohup !


Yes it was.

--
bkw
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-12 Thread Joachim Otahal (privat)

Brian K. White schrieb:


On 4/12/2012 3:36 PM, Joachim Otahal (privat) wrote:

it has not been mentioned: nohup !


Yes it was.



You are right, found your post now.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Run rsync even not connected

2012-04-11 Thread Chris Arnold
I hopethis hope this makes sense. How do you make rsync run even when not 
physically connected to the server? In other words, I run rsync from the 
terminal via vnc and when I log out of the connection, rsync stops running. Is 
there a script or something I can use?

Sent from my iPhone
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-11 Thread Kevin Korb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Use screen or tmux.  You can start rsync (or anything else) running
then detach.  Later you can log back in and re-attach.

On 04/11/12 22:05, Chris Arnold wrote:
 I hopethis hope this makes sense. How do you make rsync run even
 when not physically connected to the server? In other words, I run
 rsync from the terminal via vnc and when I log out of the
 connection, rsync stops running. Is there a script or something I
 can use?
 
 Sent from my iPhone

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+GOM0ACgkQVKC1jlbQAQdnuQCgjEWWux7uqcpDgjUWFeBL2CkN
qXcAn3+9vIe46JvdwCjPDPtcRLNiVZol
=Sg0J
-END PGP SIGNATURE-
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-11 Thread Chris Arnold
I just thought about cron! Will a cron job accomplish this?

Sent from my iPhone

On Apr 11, 2012, at 10:07 PM, Kevin Korb k...@sanitarium.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Use screen or tmux.  You can start rsync (or anything else) running
 then detach.  Later you can log back in and re-attach.
 
 On 04/11/12 22:05, Chris Arnold wrote:
 I hopethis hope this makes sense. How do you make rsync run even
 when not physically connected to the server? In other words, I run
 rsync from the terminal via vnc and when I log out of the
 connection, rsync stops running. Is there a script or something I
 can use?
 
 Sent from my iPhone
 
 - -- 
 ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin KorbPhone:(407) 252-6853
Systems AdministratorInternet:
FutureQuest, Inc.ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:http://www.sanitarium.net/
PGP public key available on web site.
 ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.17 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAk+GOM0ACgkQVKC1jlbQAQdnuQCgjEWWux7uqcpDgjUWFeBL2CkN
 qXcAn3+9vIe46JvdwCjPDPtcRLNiVZol
 =Sg0J
 -END PGP SIGNATURE-
 -- 
 Please use reply-all for most replies to avoid omitting the mailing list.
 To unsubscribe or change options: 
 https://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-11 Thread Karl O. Pinc
On 04/11/2012 09:23:57 PM, Kevin Korb wrote:
 Cron will allow for an rsync to be running in the background.
 However, there are additional steps (such as a lock file) you should
 take to make sure two don't end up running at the same time.

You could also use at if you want something to run once,
but not right now.



Karl k...@meme.com
Free Software:  You don't pay back, you pay forward.
 -- Robert A. Heinlein

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-11 Thread L. V. Lammert
On Wed, 11 Apr 2012, Chris Arnold wrote:

 I hopethis hope this makes sense. How do you make rsync run even when
 not physically connected to the server? In other words, I run rsync from
 the terminal via vnc and when I log out of the connection, rsync stops
 running. Is there a script or something I can use?

man screen (manually as a user) or
use a cron job

Lee
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Run rsync even not connected

2012-04-11 Thread Brian K. White

On 4/11/2012 10:05 PM, Chris Arnold wrote:

I hopethis hope this makes sense. How do you make rsync run even when not 
physically connected to the server? In other words, I run rsync from the 
terminal via vnc and when I log out of the connection, rsync stops running. Is 
there a script or something I can use?

Sent from my iPhone


Well, vnc is already itself one way, it just depends how you have 
vncserver, xvnc, and your desktop session set up and how you are 
disconnecting. It's possible to disconnect from a vnc session without 
closing the desktop session. In that case rsync wouldn't stop any more 
than any other thing running in that session.


nohup or screen are the usual answers for this though, not just for 
rsync or vnc.


If you don't care about seeing the output while it's running:
nohup someprogram options... 

The output is written to nohup.out by default so you can tail -f thatto 
check ongoing progress or cat/less it later when all done.



Myself I like to use screen.

screen -S foo

That doesn't look like it did anything but it did. You are now in a 
screen session named foo. You can put whatever you want for foo it's 
just a name you make up for the session so that it's easier to recognize 
and reconnect to later. So in this case you might say screen -S rsync or 
screen -S rsync_targetmachine


Now just run the rsync command. no nohup, no .

Now rsync is chugging along, press ctrl-a then d to detach from the 
screen session. rsync is still running in that screen session, just you 
are no longer attached to that screen session.


Now you can log out, go somewhere else, connect back from somewhere 
else, get a new shell, list all screen sessions:

screen -ls
you'll likely only have the one you created unless it's a multiuser 
system and someone else uses screen. It'll say chris   24371.foo


To reattach to that session:
scree -r foo

Now you'll either see the ongoing rsync, or you'll see the final summary 
messages and a new shell prompt.


If rsync is still running, just ctrl-a d again.

If rsync is done and you're done with that screen session, you should 
type exit at the shell prompt from within the screen session, (instead 
of pressing ctrl-a d to detach) that will exit that shell and close and 
destroy the screen session.

You'll be back at the parent shell and screen -ls will show no sessions.

man/google nohup and gnu screen

--
bkw
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html