Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-12-2012, 01:21 PM
|
#1
|
Member
Registered: May 2010
Distribution: Windows / Debian
Posts: 163
Rep:
|
Copy "new files found" on my debain (Server) to windows 7 (Home PC)
Hi all I have a Debian server and there is one folder (which updates with new folders files etc...) quite alot and am trying to find a way to copy everything from there to my windows 7 pc.
Now I only want it to copy "new items" found and not the same files items etc... everytime (all automatically)
My linux skills are close to zero so am really finding it hard to work this out (if something like this can be done that is)
Thanks alot!
Mike
Last edited by Vodkaholic1983; 05-12-2012 at 01:37 PM.
|
|
|
05-12-2012, 01:33 PM
|
#2
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
Sounds like you could mount a shared directory on the Windows machine via Samba, and sync that up with the local directory using rsync.
|
|
|
05-12-2012, 01:35 PM
|
#3
|
Member
Registered: May 2010
Distribution: Windows / Debian
Posts: 163
Original Poster
Rep:
|
Quote:
Originally Posted by MS3FGX
Sounds like you could mount a shared directory on the Windows machine via Samba, and sync that up with the local directory using rsync.
|
Oh something else to add (sorry missed this part out) once the files are windows side they will be moved (by me) so will sync still work? (as I need it to remmber what files it moved before so it don#t move them again.
|
|
|
05-12-2012, 03:44 PM
|
#4
|
Member
Registered: May 2008
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82
Rep:
|
Quote:
Originally Posted by Vodkaholic1983
Oh something else to add (sorry missed this part out) once the files are windows side they will be moved (by me) so will sync still work? (as I need it to remmber what files it moved before so it don#t move them again.
|
I'm not sure I completely follow this, do you want to push files from your server to your windows box only? (A single direction push could be achieved using samba or even using something simpler like an ftp server or other program on the windows box).
If the files are going to be moved once they're on the your windows machine then you would need to setup a log file and have rsync or another utility check that log file to see what needs to be moved regardless of whether it exists on the client, otherwise tools like rsync just look at the server and client and they make the files on each side match up.
So, why do you want to manually move the files once they're on the windows machine? Are you doing this for the purpose of backup or what're you hoping to accomplish?
|
|
|
05-12-2012, 09:05 PM
|
#5
|
Member
Registered: May 2010
Distribution: Windows / Debian
Posts: 163
Original Poster
Rep:
|
Quote:
Originally Posted by djsoundfx
I'm not sure I completely follow this, do you want to push files from your server to your windows box only? (A single direction push could be achieved using samba or even using something simpler like an ftp server or other program on the windows box).
If the files are going to be moved once they're on the your windows machine then you would need to setup a log file and have rsync or another utility check that log file to see what needs to be moved regardless of whether it exists on the client, otherwise tools like rsync just look at the server and client and they make the files on each side match up.
So, why do you want to manually move the files once they're on the windows machine? Are you doing this for the purpose of backup or what're you hoping to accomplish?
|
Hey right
I have a folder on my server which downloads are added
/home/leeching done
I want everything in that folder to be "copyed (only once per file)" to my home pc Q:/leeching done
I want it copyed so that it can still be in seeding state
When its back on my home pc I will be moving them to there right places >>
Hope this makes it easyer to work out what am trying to do
Cheers
|
|
|
05-13-2012, 12:08 AM
|
#6
|
Member
Registered: May 2008
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82
Rep:
|
Got it, so I'd still recommend setting up a samba share (this will initially take some time, effort and research) but samba has a great deal of documentation and there are thousands of tutorials out there. From there you just need a basic little script to run as a cronjob something like
Code:
#!/bin/bash
# First move the logged files (files we know were transferred) to an excludes file
echo /path/to/rsynclog >> /path/to/excludes
# Now perform the actual backup
rsync -v --exclude-from=/path/to/excludes --logfile=/path/to/rsynclog /home/leechingdone /PC(Q:)/leeched
This is very crude but it should give you the idea that you log the files you're moving, then each time before you start to move files you make sure that you're excluding the previously moved files.
|
|
|
05-13-2012, 12:09 AM
|
#7
|
Member
Registered: May 2008
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82
Rep:
|
Oh and if this runs for long enough you'll have to add some lines to prune the excludes/logfiles from time to time but I doubt that will be an issue for a long time
|
|
|
All times are GMT -5. The time now is 11:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|