General :: Bash - Sync Files Between 2 Remote Computers Using Terminal
Jun 25, 2011
I want to be able to synchronise files between 2 remote computers in both directions. Say for example that I want to synchronize my /home/Documents directory with <username>@example.com:/home/Documents What's the easiest way to update the folders in both directions, so that new/updated files on my home computer get transferred to the remote computer, and new/updated files on the remote computer get transferred to my home computer?
I've discovered Firefox Sync a while ago, and it's absolutely awesome. Now of course I'd like most of my software to work this way! So is there a way to get the same behavior with Thunderbird?
I have a music archive on several computers, from time to time do I add, remove or change the archive on one computer. To keep this changes will I have to copy the new version of the music archive to all the other computers.
is there a program that can sync the music files. Let say that I update the info in one music file, then will the sync program notice the newer version and replace the old file with the new files on all the other computers.
I guess I would need a dedicated server for this where all changes are stored with some kind of version number of the music archive. Since not having a server would make everything (I guess) much more complicated. All computers would have to communicate with each other to check for a new version instead of only communicate with one computer (the server).
I'm looking for a way to sync directories between two computers, in a "two-way" fashion. Basically, I have a laptop and I have a desktop, and I want to keep a particular directory synced between the two machines. The easiest thing would be to have some kind of networked filesystem, but obviously this won't work because the laptop may or may not be connected to the internet at any moment. At any time I might be editing files on the desktop or on the laptop, and when the laptop is connected to the internet, I'd like all files on both machines to be synced to their most recent versions.
I thought I could do this with rsync but now that I've looked into a bit more it seems like it works only for "one-way" syncing. In other words files are synced from a server to a client or vice versa, but not both at once. First of all, am I right about that? And second, is there a program that will do what I want to do? OK, I guess you could do it with some SVN kind of thing but that seems like overkill. I guess if there's nothing out there it shouldn't be too hard to write a script myself to do it.
Alright so i just wanted to try and get remote desktop connections running so i can access files on the other computers in my house. For my first try i went after my laptop. I'm using rdesktop.
First couple times i tried i typed in
Code:
After about 15 seconds it would pop back with
Code:
I realized that my laptop's firewall was blocking the packets, so i created a custom rule that allows all TCP packets on port 3389. So i fired up rdesktop again. Now it pops back with:
Code:
But instantaneously, not after 15 seconds (not sure if thats significant or not.) I checked my firewall's log and it allowed the tcp packets.
I'm trying to make a cheap bash script that will log me into a remote terminal. When I run the script, it prompts me for a password. I'd like to include the password entry into the bash script. How do I do this?
I wanted to create a consistent sync between two directories on two separate hosts. So when I write a file on one host, the file is automatically written on the next host. I don't have shared storage between each host.
Is it possible to have a folder that is stored on my server mounted via smb etc, that copies over any file that has been updated on my machine? I believe I'll prob have to learn some scripting to accomplish this, but here is what I want to do.
I have three computers, a laptop for school, a desktop at home and a server box sitting around for hosting files (I have access to this from anywhere). I have a folder for all of my school work, we'll call it "school". This folder is present on my laptop and desktop. Sometimes I work on my laptop at school and have new files created / updated. Other times, I work on my desktop and alter files / create new ones there. What I was thinking was using my file server as a repository. After I am finished working on one machine, I want to upload all the new files/folders to the server, so that when I work on the other machine, I can run a quick "fetch files" and being to work off of where I left of. That way, I don't have to copy files over via email or my network. Also, it's very helpful to have the updated files always stored on my server because sometimes I need to grab a file but don't have access to any of my computers.
i was wondering if there was a way to sync two computers so that all the data in the /home directory was exactly the same on both, and it was done automatically as soon as theyre both turned on and connected to the same network?
i have a laptop and a desktop that i want to basically mirror each other.
i take my laptop everywhere, so i want to be able to do work on it, take it home, turn on my desktop and as soon as my laptop is connected to the network, it'll automatically sync the files to the desktop.
i want the reverse to also occur - meaning i do some work on the desktop and have it automatically sync up to my laptop while im working on the desktop if the laptop is on at the same time, or as soon as i turn the laptop on.
i had rsync set up before, but i had to initiate it manually, and i was never sure if it was overwriting files or appending.
I am interested and looking forward to get a smartphone or a personal data assistant with calendar/ email/ contacts just like the iphone does.My intention is to be able to sync my smartphone's data with my home server that actually carries my PIM applications. Basically, during the day when I am not home I will modify or add/remove data from the phone. When I arrive home I would like to be able to sync my changes to my server. My laptop will be reconfigured to retrieve and sync from that server.
Proudly running with Slackware on ALL my machines (gotta love Slack!), and Apple being **** by not supporting open source and linux environment, it seems that it will be difficult to have something working out of the box and will probably require jail-breaking the device, etc.. I don't want to rely on external services such as Google calendar except for the email from Gmail.
How can I export my Ubuntu terminal's color scheme for use on other computers?I've set up a color scheme that I like and I'd like to put it in a git repo for easy loading from other machines. Any strategy that would make it work in other terminal apps too, such as Konsole?
I've got Ubuntu One syncing a single 25MB folder on 4 computers. On one of these computers, the ubuntuone-syncdaemon process constantly pegs the CPU, using from 50-80% long after any sync-able files have been modified and successfully synced. The process is only using 8.9MB of RAM.
Specs: Ubuntu 10.04 (lucid) Kernel 2.6.32-24-generic 1000.8 MB RAM Pentium 4 2.53GHz Free disk space: 280.9 GB System monitor shows 56.8% total RAM usage, 15.4% swap file usage.
I want to transfer files (a music folder) between two Linux computers. After searching for the best way to do this, I've seen that there are lots of ways of doing this. I know this has been asked a lot, everywhere and all the time. The main problem with this is that there is no clear, recent consensus on one best way to do this task in 2011 for Linux beginners (even depending on some parameters).
So in the spirit of the Stack Exchange websites, I want this not to be related to my particular situation, but more of a guide to others as well on how to transfer files between two Linux computers over a local network. I think a wiki would be useful for many.
Here's what I found so far:
ssh sshfs scp sftp nfs samba giver
What is the easiest? Most flexible? Simplest? Best solution? What are the pros and cons of each? Are there other (better) options? What are the parameters in choosing the best method (solution might depend on number of files, filesize, easiness vs. flexibility, )?
I have a Windows 7 Desktop and an Ubuntu Laptop connected with a KVM switch. I use the setup for software development, so I am constantly switching between the two, so I need a way to quickly transfer files between the two. I'm not sure if this is possible, but if I could connect them in a way where the OS of each mounts the hard drive of the other. Is there a way I could do this?
Networking Problem Fedora 14 2.6.35.12-90.fc14.i686. I am trying to share files between 2 Fedora 14 computers , a desktop and a laptop, both located on my local DSL server. The laptop sees its public files and the public files folder on the desktop computer - looks fine. The desktop computer acts differently. Both systems show an entry of "unknown type" in the directory listing, for the public files directory. But whereas a right click on the directory entry on the laptop offers "open" the same operation on the desktop computer offers "open gedit". When I double click the entries on the laptop, entries appear on the main screen. If I double click the entries on the main screen, the directory contents are displayed. But, if I doubleclick the directory entries on the desktop computer 1- I get a black box that says there has been a crash in gvfs-1.6.6-1.fc14 and an error message box tells me Dbus error org.freedesktop.DBus.ERROR.NoReply: Message did not received a reply.
I have two computers: one is connected with router by wi-fi and another is connected with router by lan. How I can optimal organize connection between two computers with Ubuntu 10.04 for transfer files? What Do I do? Can I share some folders,
I have 2 Mounts /mnt/Movies and /media/Movies, mnt goes to a network drive that is mounted via cifs and media is also a network drive mounted via NFS. I normally keep drives in sync using rsync and have done so with these drives. But for some reason there's a bunch of files that on /media/Movies that just wont copy over to /mnt/Movies. I've tried touching the files and then running rsync with the whole file option it picks up the files need to be sync'd but they don't appear.
I've tried using cp on the missing files but the files just never appear but it does take about the right time for the prompt to come back indicating it would be copying the data. So my next idea was to use mc. I compared the 2 directories and it selects 83 files that are not in both folders, so then I tell it to copy them, and it comes back saying 'target already exists', if I overwrite or update they still don't appear. I've unmounted the shares, reboot the server and both network drives and run the network drives disk check but nothings helping. I'm trying to avoid deleting the folder and just rsyncing everything again.
How can I sync files from Windows Server 2008 to a Linux box? Windows Server can sync files to another active-directory box automatically. Can i do that with linux too?
I can see the owner and group ids are shown because there are no corresponding entries in /etc/passwd and /etc/group respectively. I don't know much about linux and dare not to edit these files, I wonder if somebody already knows whether linux would map the owner id of files coming from other computers to the account name in /etc/passwd and display them when necessary (for example, when using ls -al)?
Im used to using nautilus within centos but have recently just got a VPS and quickly realising that using a KDE is unacceptable in this environment. Although I do find it so much quicker doing things like folder permissions in KDE rather than typing it all out in the terminal? Everyone I speak to says, use the terminal and I should learn this way as opposed to using the KDE, but theres certain things I just dont get
How is it possible to make quick changes to scripts and viewing them in a browser etc , without a mouse or using KDE? and only using a terminal?? I am wondering how to develop websites just using the terminal?
How can it be quicker to type out/view permissions etc in the terminal when its instant and just a few clicks in the KDE?
I go to system > preferences > network connections in 9.10 and import a profile. The vpn seems to connect but I cannot ping computers on the remote network. When I attempt to ping, it seems it can see an ip (DNS must be working) but I can't actually ping the machine or rdp in. I've disabled my firewall and rebooted and that didn't help. What can I do?
I want local programmatic access to ssh output in Mac Terminal. First, I tried redirecting the output of each command to a file. The file was perfect, but of course it was on the remote server, and an sftp for each command output seemed a little.. Next, I tried to Applescript Terminal, but it only gives access to the currently visible text in a tab (i.e. if half the output has already scrolled out of sight, it doesn't get returned - useless).
Last, I tried piping ssh to tee (e.g. ssh user@host | tee output.txt). This almost worked. I have the output in a local file, but there are a lot of unwanted characters mixed in. For example, every time I hit backspace, there's a ^H in the file. There's also text like "[0m[K" which is harder to get rid of.
I looked around for threads addressing this issue and some have come close to answering it, but I have yet to see a definitive yes or no. Anyway - Here's my issue:
Background: I can SSH into my home computer (Ubuntu 9.04 running Gnome) from work (Win XP Pro) using RealVNC via Putty tunnels. This has been working flawlessly for me for awhile now. I was messing around in the terminal window and accidentally rebooted the linux box (home computer) while I was at work. No big deal I thought. So I re-start the Putty connection, and it is back up in no time. Then I try to start the VNC connection, and no go, connection refused. I remember seeing that in order for the VNC connection to work, I had to be logged into the Gnome desktop already on the Ubuntu box.
Question: Is it possible to log in and start up a Gnome desktop session from the terminal command line in Putty so I can get the VNC connection back?