From: Martin Langhoff <[EMAIL PROTECTED]> --- client/ds_backup.py | 8 +++++--- client/ds_backup.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/client/ds_backup.py b/client/ds_backup.py index 60d0be2..089a2e9 100755 --- a/client/ds_backup.py +++ b/client/ds_backup.py @@ -83,9 +83,11 @@ def rsync_to_xs(from_path, to_path, keyfile, user): # Transfer an empty file marking completion # so the XS can see we are done. + # Note: the dest dir on the XS is watched via + # inotify - so we avoid creating tempfiles there. tmpfile = tempfile.mkstemp() - rsync = ("/usr/bin/rsync --timeout 10 -e '%s' '%s' '%s' " - % (ssh, tmpfile[1], to_path+'/.transfer_complete')) + rsync = ("/usr/bin/rsync --timeout 10 -T /tmp -e '%s' '%s' '%s' " + % (ssh, tmpfile[1], 'schoolserver:/var/lib/ds-backup/completion/'+user)) rsync_p = popen2.Popen3(rsync, True) rsync_exit = os.WEXITSTATUS(rsync_p.wait()) if rsync_exit != 0: @@ -130,7 +132,7 @@ if __name__ == "__main__": sstatus = check_server_available(backup_url, sn) if (sstatus == 200): # cleared to run - rsync_to_xs(ds_path, 'schoolserver:datastore', pk_path, sn) + rsync_to_xs(ds_path, 'schoolserver:datastore-current', pk_path, sn) # this marks success to the controlling script... os.system('touch ~/.sugar/default/ds_backup-done') exit(0) diff --git a/client/ds_backup.sh b/client/ds_backup.sh index 9916334..334e4eb 100755 --- a/client/ds_backup.sh +++ b/client/ds_backup.sh @@ -121,7 +121,7 @@ fi # We use this to stagger client machines in the 30 minute # slots between cron invocations... # (yes we need all the parenthesys) -(sleep $(($RANDOM % 1200))); +#(sleep $(($RANDOM % 1200))); # After the sleep, check again. Perhaps something triggered # another invokation that got the job done while we slept -- 1.5.6.dirty _______________________________________________ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel