wrote a script to sync my netbook music with my server music and everything was fine.but if for some reason lets say i run it accidently and i'm not connected to my network, i just wiped my netbook music .here's what i got so far:
i need to have the --delete option in rsync (say i sync it and realize i hate some music, when i delete it from the server i don't want it still on the netbook.i want an if statement in here somehow, but i'm not sure how to do it.something like, the first command in the script should be a ping test, if ping doesn't work end the script, if ping does work continue or if the server music gets mounted to the created directory continue, if the mount failed, or even in the mounted folder is empty stop the script
what can i do here to ensure i can keep the --delete and not have to worry about losing my music if the mount fails?
I want to use rsync to synchronize some folders on my LAN. I have this working with two scripts; one runs at the beginning of my work session and gets the latest directory tree from the server, and the other runs at the end of the session to put any local changes back on the server. My "get" script looks something like this:
This works well, and with the "b" option any file that has been deleted from the master directory tree on the server will be deleted from the local machine and moved to the local backup directory. This is a safety measure to prevent the loss of files through a mistake (on my part).
I want to run both scripts from the local machine, but the "put" script will not save deleted files to a backup directory. I tried using a remote backup directory like "my_server:/home/user/rsync_backup_dir" but this did not work. Is there a way to backup files deleted from a remote server from an rsync script run locally?
Why is there no Delete when I right click like there is with Windows in ubuntu? Pretty much everything else is there like new folder and so on Is there some way to add it? Also why when i delete something does it not ask me if I am sure that i want to delete that file?
OK, here is the test code I am using: rsync -acrv /home/randy/Documents /media/USB2/testbackup. What should I put in the code so that when I delete something in the Documents folder, it will also be deleted in the testbackup folder when I perform a sync.
How can I have it so the code will check if USB2 is available, if it is, do the sync, if not, do nothing.
I need a program to run on Ubuntu that must be easily set up to do a series of different cloning operations at specific times between the USB drives on a single Ubunu pc, depending on the day of the week." So on Monday folder B is forced to match folder A, Tuesday C forced to equal D ... and on Sunday a whole bunch of these clonings happen. This must all run unattended (at 2am) and be robust with no "what do you want to do next messages" or having the whole thing give up if there is a problem with one file. Though I do need a log of success or failure. Windows programs that do this stuff are FolderClone and GoodSync. I looked at Unison and Rsync and one or two others, but none appeared set up to do what I need, or to be excessively complex / general. I don't need something that can sync two copies, or over internet ....
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.
I want to synchronize sets of files (e.g. from or to flash memory). rsync is powerful, but --delete option is dangerous. Anyone know whether there's a way to do --delete interactively, i.e. get rsync or some near equivalent to ask (y/n, in a console window) before deleting?
I built a script that downloads my podcasts using Gpodder into the directory /HOME/SHARED/PODCASTS/ (with a subdirectory for each podcast)The script then selects the latest episode and copies it over to a target directory (it empies the target directory first and copies over everything) I want to use RSYNC to make sure the 'not so fresh' episodes get deleted and the "fresh" episodes get copied over. Then dropbox can sync the "new" files over to the cloud where i can access them via my ipad/iphone (whole other story).The thing is : i've replaced the cp command with the RSYNC command and now the script is acting strangely.
It selects and sync's over the "newest" podcasts to the destination directory. Then it suddenly DELETES all the episodes in the destination directory and copies over the three last files.
I would like to use rsync to keep the hard drive in my media server synced with my video collection on my linux server. The media server I believe is running some version of linux running samba. I mount the media servers share to a folder on my linux server & use the following command: rsync -a -vv --delete /home/shared/Videos/* /mnt/WDLive/Shearer Files/Movies/
However, it does not delete files on the media server that I delete on the source. I also created a new folder on the source & moved some of the files into it. When I ran rsync again, it created the new folder on the media server, but it recopied all the files from the source again, instead of moving the files which were already on the media server into the new folder, so no I have 2 copies.
I have been having some issues with Ubuntu One. I am running Ubuntu 10.10 Maverick. For some reason, Nautilus tells me that Ubuntu's default Videos folder (there is data in this folder) is synced on Ubuntu One when it is not. I have checked on the Ubuntu One website, and the site says the Videos folder is not synced (Ubuntu One's website does not show the Videos folder under "my synced folders"). When I attempt to uncheck the sync option in Nautilus, the loader next to it spins endlessly, or Nautilus gives me an error that it can not sync the folder.
I'm trying to set up rsync to only copy new songs from my computer to another. I'm using the "--ignore-existing" argument, but it appears to copy all files anyway. The client (source) is Windows 7 64-bit running DeltaCopy Client and the server (destination) is Synology DS410 (running rsyncd).
I'm running rsync and outputting the log to a file using --log-file option. I am also using the --link-dest option, which in turn is adding the hard link creation output for EVERY file in the log file. I want to ONLY show the actual file transfer (if any) that take place.
In the 'log format' section of rsyncd man page here I assume you can do this, I just can't make sence about the code. If someone has better experience with reading it, can you please assist ?
I have 2 folders that are synced using rsync. Right now if I delete a file in the source folder, the destination folder still retains that file. Is there a way to get rsync to delete files if they were deleting at the source?I could not find anything in the man page.not sure if I'm missing something or if that feature just doesn't exist.
I installed cygwin with rsync on a Win XP Machine. My goal is to backup a folder from one hard drive to another (both on XP machine).
I run the following command from a batch file:
Works fine except the --delete flag is not working. Copies everything in source to destination, but doesn't delete some extra files that are present on the destination, but aren't on the source, which it's supposed to. I looked at the rsync man page, and I'm doing everything right... such as not using wildcard.
The same command works perfect on another computer (XP machine; source and dest both on XP machine).
Have anyone used an email client that stays in sync with a free Hotmail account? I have setup Claws Mail but when I delete an email within the client it remains on the server. I remember this being the same for other email clients. Is there any client that will stay in sync? If I delete an email from within the client it will also be deleted from Hotmail's web bases interface.
iam trying to sync file server data into backup server machine by command- rsync -avu path/of/data ipaddress-of-backup-server:/path/where/to/save after running it ask for root password and manually it is successful.but i want to make it automatic.for that i also tried cronjob and also generated authentication key but iam not successful in login automatically..anybody know how to authenticate root to login for storing data in backup server.
I am thinking of using rsync to sync my Music folder to another folder called Music on an external USB drive. I will be using the Scheduled Tasks front end to schedule the syncs. What should the syntax look like when I put it in Scheduled tasks. I want this to be as simple as possible.
10.10 on a ext4 partition. I deleted a folder that sat on a NTFS partition that I use as data storage. I note that if I delete folders or files on this NTFS partition there is not the option to move to waste basket - it is just deleted. If the folder still exists on the hard drive (has not been over written) I may be able to retrieve it - but where could it be? On the NTFS partition?