General :: Rsync, Crontab And Backing Up Files?

Apr 11, 2011

This is a quick one, I don't have any problems yet, I just want to check that this is going to do what I think it is. I added the line

Code:
00 01 * * * rsync -avz --delete /local-storage /mnt/usbackup
to my crontab file, am I to understand that this will backup /local-storage to my external

[code]...

View 4 Replies


ADVERTISEMENT

Server :: Rsync Execution - With Crontab - Have Given Full Path To Rsync Too

Apr 12, 2011

I have a tiny shell script to rsync files between two servers and remove the source files.

This script works fine, when it has been initiated manually or even when the rsync command is executed on the command line.

But the same script doesn't work, when I try to automate it through crontab.

I am using 'abc' user to execute this rsync, instead of root, as root login to servers are restricted in all of our servers, by us.

As I mentioned earlier, manual execution works like charm!

When this rsync.sh is initiated through crontab, it runs the first command(chown abc.abc ...) perfectly without any issues. But the second line is not at all executed, and there is no log entry i can find at /mnt/xyz/folder/rsync.log.

View 6 Replies View Related

Ubuntu :: Backing Up Data Using Rsync Via SSH From Windows

Feb 19, 2011

I am backing up may data using Rsync via SSH. I am trying to find a solution that allows me to push my backups from windows and Ubuntu to a Ubuntu server. I don't like the solution that requires my windows machines to have shared drives. Not viable for laptop users that may piggyback on free wireless networks. I would also like a solution that has a GUI for the desktop user but not totally required. I will need a solution that allows me to restore files by date. I do a lot of changes to files on a daily basis and sometimes need an older copy of a file.

I love using Rsync as it is a very simple solution and extremely quick. The only thing I don't know how to do is recover different version of a file. It would be nice to see a visual representation of all the files and different dates of each file. I know I might be asking a little too much, but, it is after all, Linux.

View 2 Replies View Related

Ubuntu :: Rsync - .sh And Crontab

Feb 14, 2011

I'm currently trying to have crontab to automatically backup files from ramdisk. It works perfectly when I run it myself by simply cd:ing to scripts directory and type ./save_world.sh.

The problem is, that crontab DOES (at least it looks like it) run that command every one minute. /var/log/syslog does show it executing that line every one minute without any errors. I'm currently very confused what I did wrong here. I have tried rebooting, fiddling with crontab line, tried sudo crontab -e but nothing seems to work.

My script is called save_world.sh and it is located in /home/phoe/minecraft/rpg/

Code:

My crontab -e has one line and it is following:

Code:

I haven't determined any specific time yet, because I'm just trying to get it work first.

Snippet from /var/log/syslog:

Code:

View 4 Replies View Related

General :: Crontab Not Working \ Edited Crontab File Using Crontab -e?

Apr 27, 2010

I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday

View 3 Replies View Related

General :: Rdiff-backup Keeps Backing Up A Symlink, Ignoring Files Under It

Dec 6, 2010

I've got a backup.list file that looks like this:

+ /ext/installs
+ /ext/media
- /ext
- /backup
- /dev
- /mnt
- /proc

/ext is a symlink to /mnt/vg1/vol1, under which are installs and media directories.

I'm running:

rdiff-backup --backup-mode --include-globbing-filelist backup.list / /backup

rdiff-backup keeps recreating a symlink: /backup/ext -> /mnt/vg1/vol1, which is kind of missing the point, because then it doesn't actually back up the files in /mnt/vg1/vol1/installs, etc.

View 1 Replies View Related

Software :: Run Rsync To Download Files From A Server Without Rsync Daemon?

Sep 18, 2009

I just tried to sync files from one server to another. After the sync process, I found the files are bigger than original ones.

I looked up the web and found someone mentions the rsync daemon. So I have to run the daemon on one server before I run the rsync?

The command I used is rsync --partial --progress -r source destination

View 1 Replies View Related

Server :: Rsync Can Not Rsync Files With Include Filter

Jul 21, 2010

use rsync to cp such files and dirs under /var/www/html/mydir directory but these two files(/dir4/1.html /dir4/2.html) cant rsync to dest mechine.

rsync configure file,below...

View 2 Replies View Related

General :: Viewing All Crontab Files On A System?

Nov 16, 2009

Is there a way to view all the crontab files, owned by root, users, and other system accounts, that exist on a system simultaneously rather than having to go the individual accounts? The distribution in question here is the Debian 4.0 release.

View 2 Replies View Related

General :: Possible Disabling Crontab Job Without Deleting Crontab Description Entry

Jun 23, 2011

is it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh

View 4 Replies View Related

Fedora :: Backing Up Using "rsync"?

Dec 5, 2010

I'm using rsync for the first time to back up stuff to an external hard disk. I used the "rysync --av myfile remote-file" command. It seems like it is much faster than going through the KDE copy paste method. Lots of files to copy. Right now, it looks like it is hung up, but I'll let it do its thing.Is this a good method or should i tweak it some way that is more efficient?

View 2 Replies View Related

General :: Rsync Would Keep Sending The Files Over And Over Again?

Mar 2, 2010

I'm trying to using rsync to backup some files, about half a TB. It's now it a state where it keeps sending the same files everytime it runs. for example:

rsync -av /data/source/* user@host:/data/dest
sending incremental file list
source/file1.txt
source/file2.txt

I then verify those files are copied over. then the next time it runs it does the same thing

rsync -av /data/source/* user@host:/data/dest
sending incremental file list
source/file1.txt
source/file2.txt

any idea why it's getting stuck on these files? I've tried to wipe the whole dest directory out and start over but no luck.

View 2 Replies View Related

General :: Rsync Only Newest N Gb Of Files?

Jul 27, 2011

I have two directories, dirA whicht contains N gb of data and dirB which is supposed to contain only the newest M gb of data from dirA. When files are added to dirA, they sould also be added to dirB, while the oldest files in dirB should be deleted.Is that possible with rsync? or any other software?

View 1 Replies View Related

General :: Rsync With Scp - Copies Everything - All Files

Jul 12, 2011

rsync -r -v -e ssh root@nn.nn.nn.nn:/usr/local/websites/* /usr/local/websites and each time I run it it copies everything - all files. I thought rsync was only supposed to copy files that had been added or modified.

View 3 Replies View Related

General :: Rsync N Newest Files In A Directory?

Nov 8, 2010

What would be the easiest way to go about rsyncing the n newest files in a directory to a remote server?

View 2 Replies View Related

General :: Rsync Not Deleting Files On Target

Sep 8, 2010

I'm using the command below to sync two directories. Problem is insted of deleting the files on the target directory it simply appends a ~ character at the end of the file name. Not sure why this is happening?I'd like to have all deletes on the source replicated on target.

View 2 Replies View Related

General :: Rsync Files With Dates After A Certain Date?

Jun 8, 2010

I was going to do a rsync -r -a -z -v -p -e sshto move some files frome server to another, but then realized all I really need are files which have dates starting June 1, 2008 to current. Is there a way to have rsync only sync those files?he directory structure that's my source goes all the way back to 2004.

View 5 Replies View Related

General :: Order Of Transfer All Files Under A Directory By Rsync

Sep 25, 2010

If transfer all files under a directory by rsync, what is the order that rsync determines to transfer the files one by one?At first it looked like rsync transfers files in alphabetical order, but later I found rsync skipped some files in the first sweep through the alphabetic order, and then went back to transfer files that were skipped in the first time and this time still in alphabetic order.

View 1 Replies View Related

General :: Rsync And Making Sure All Files Have Been Transferred Before Applying The Changes?

Nov 15, 2010

I was wondering if there is a way to tell rsync to only apply changes (delete, overwrite,create) only if all files in the file list transferred successfully.Just to clarify, this would essentially be putting a transaction around the transfer.

View 3 Replies View Related

General :: Rsync Speed For Single Files And Directory?

Mar 23, 2010

Recently i am trying to check on the rsync speed for single file(2.4GB iso) directory ( 900MB directory with files inside ) When i run the rsync for single file: the speed i get is average 50MBps However, for a directory: average speed is 10MBps Is there any reason behind this ? i tried to google but unable to get the concept.

View 2 Replies View Related

General :: Rsync With Skipping 0 Bytes Files Option?

Jun 10, 2011

For backup purposes, I have been trying to find out a solution for Rsync -avr sourcefolder targetfolder with Skipping 0 bytes files option.

However it seems that they are no solutions. Would someone have an idea, to skip to source files into the sourcefolder that have no content, ie. 0 bytes?

View 2 Replies View Related

General :: Files Seem To Take Up More Space In Destination After Rsync Copy?

Feb 9, 2010

I have recently purchased an external hard drive in order to backup my home partition. In my PC I have a "1.5T" drive with several partitions on it, containing OSes and the home partition. The home partition is 1.3T according to df, the external drive contains one partition that spans the entire disk,df reports it as 1.4T in size. Both partitions are ext3. When I use rsync to copy files from the home partition to the external partition, the external disk becomes full, despite the destination - supposedly - being larger than the source. I don't understand why copying files from one partition to a slightly bigger partition should need more space than on the source partition. Does anyone know what is happening ?

Details : I created the partition on the external drive with gparted; gparted reported it the already have several gigabytes in used space immediately after the partitions creation - I thought at the time that this must be normal. The home partition contains many files of all sorts, including lots of big audio and video files. If you are wondering, for all my important files this external disk is only secondary backup, as they are also backed up to the "internet".

These are the mount points :

/mnt/tmp/ : home partition, /dev/sdb6
/mnt/external/ : external partition, /dev/sdc1

I used rsync to copy the files, I know there are more efficient ways to do this, but I wanted to use the same command that I will subsequently run to sync the backup.

rsync -av --progress --stats --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

Next I tried adding the --sparse switch, as I was wondering if the problem may come form sparse files. I don't know however if rsync would go back and shrink the sparse file by just adding the switch and executing the command. I also added --one-file-system, for good measure. Here is what I ran next :

rsync -av --progress --stats --sparse --one-file-system --recursive --perms --links --delete /mnt/tmp/ /mnt/external/

I tried an fsck on the home partition :

fsck -f /dev/sdb6

This is the output from the last rsync :

rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Broken pipe (32)
rsync: write failed on "abcd.avi": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(302) [receiver=3.0.6]

[code]....

Looking at the destination after a partial copy seems to indicate that the problem is not symbolic links being "expanded". I have not checked the source filesystem for sparse files, nor the destination to see if these files could be larger there, as this does not seem trivial.

Here is some additional info :

$ df /mnt/tmp/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb6 1415342836 1414173740 369096 100% /mnt/tmp

[code]....

View 2 Replies View Related

General :: Rsync Deleting Files From Destination Directory?

Jul 14, 2011

We have an rsync cron job set up to mirror all the files in a "..dashtdocsdocs" folder to the same folder on another server. It copies all the files over correctly and deletes any files in the "docs" directory that aren't in the sending directory, but it also deletes any files we put in the target directory's parent folder (..dashtdocs or other subfolders like ..dashtdocsimages) even though they've been excluded in the .rsync-filter file.

Here's our current rsync .sh:

/usr/local/bin/rsync --stats -qPzrtpl --delete --password-file=/var/run/.appprodrsync --log-file=/export/home
/webuser/logs/rsync-extranet-log -FF /export/home/ appprodrsync@appprod::dprweb_extranet/ > /export/home/webuser/logs/rsync-extranet-output 2>&1

[code]....

So for example server A has ..dashtdocsdocs and ..dashtdocsimages. Server B has ..dashtdocsdocs but if I manually copy the images folder over to ..dashtdocsimages, the images folder gets deleted from the target directory every time rsync runs.

A: ..dashtdocsdocs
..dashtdocsimages
B: ..dashtdocsdocs
..dashtdocsimages (<-- gets deleted everytime rsync runs)

I'd like to keep just the docs directory synched and update other folders manually, but they keep getting deleted. It looks to me like it's running a delete-excluded option, but that option wasn't used.

View 2 Replies View Related

General :: Why Doesn't Rsync Use Delta-transfer For Local Files?

Jan 17, 2011

I have a big iso image which is currently being downloaded by a torrent client with space-reservation turned on: that means, file size is not changing while some chunks in in (4 Mib) are constantly changing because of a download.

At 90% download I do the initial rsync to save time later:

$ rsync -Ph DVD.iso /media/another-hdd/
sending incremental file list
DVD.iso

[Code]....

Then, when the file's fully downloaded, I rsync again:

total size is 2.60G speedup is 1.00

Speedup=1 says delta-transfer was not used, although 90% of the file has not changed, target dir is on another FS and copying takes several minutes. Why doen't it try to speedup the transfer?! How can I force rsync to use delta-transfer?

View 1 Replies View Related

General :: Rsync Error Message For Command - Files Could Not Be Transferred

Aug 10, 2010

I have rsync error message for this command,

Quote:
rsync -avr --delete --exclude lampp/tmp/* /opt/* /backup/opt/
rsync -avr --delete --exclude data/session/* /var/www/html/dmcatholic/* /backup/dmcatholic/

The error message is here.

[code]....

sent 1917154 bytes received 384128 bytes 5731.71 bytes/sec total size is 12220966785 speedup is 5310.50 rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]

View 8 Replies View Related

General :: Rsync Files Recursively But Place In One Remote Directory?

Jan 29, 2011

i would like to find and backup all *.mp4 files from /Pictures and its sub-directories and move them to a single directory on a remote. I can find and move the files but I don't want the directory structure...just the files to be placed in the remote directory.

To find my files I use

rsync -r -a -v -e "ssh -l user" --delete --include '*/' --include '*.mp4' --exclude '*' /home/drew/Pictures/ remoteserver:/Users/drew/mp4

but this creates all the subdirectories

I also tried

find ~/Pictures -name "*.mp4" -exec rsync -r -a -v -e "ssh -l user" --delete {} remote:/Users/drew/mp4 ;

This works but takes forever

View 3 Replies View Related

Debian :: Backing Up Configuration Files Using BAK

Mar 30, 2014

Before I used to make a copy of configuration file and give the end of the file name as 'something.conf.bkp' . Later realized it was a mistake. The correct wording should end in .bak and not bkp .

As per (See apt.conf(5) manpage, section DIRECTORIES, last paragraph.)

The Ignore-Files-Silently list can be used to specify which files APT should silently ignore while parsing the files in the fragment directories. Per default a file which end with .disabled, ~, .bak or .dpkg-[a-z]+ is silently ignored. As seen in the last default value these patterns can use regular expression syntax.

View 7 Replies View Related

Ubuntu :: Backing Up Files Changes Permissions?

May 14, 2010

I did a clean install of 10.04 over the weekend and copied all of my backed up files from my external drive back to my internal drive. However, I've noticed that when I moved all my files back, they're all now marked as being executable. I've since fixed this, but I was wondering why this happened to begin with?

I use rsync to backup my files (grsync to be exact), but when I do so I copy files from my internal drive, which is formatted as ext4, to my external drive, which is formatted as NTFS (I keep my external drive as NTFS in case I need to hook it up to a Windows machine). Does the file system discrepancy have to do with why my permissions change when I backup/restore my files? Is there a way to prevent this? Or should I be backing up my files a different way?

View 1 Replies View Related

Fedora Servers :: Set Up A System For Backing Up Files?

Nov 17, 2009

I would like to set up a system for backing up files and even possibly using it to keep music on and listen to it over the network. I am wondering which would be better to use a separate FTP server or buy one of the NAS enclosures and a couple of hard drives to put in it. I am assuming that the NAS would be accessed via NFS. I have never run an FTP server and I have never had used NAS.I am just looking for pros and cons to each one. I would just like opinions as to which service (FTP/NFS) would be better for this task.

View 4 Replies View Related

OpenSUSE :: Backing Up Samba Server Files?

Mar 9, 2011

I have a Samba server on a computer. I would like to backup the Samba files on a different computer that is a client in the Samba server network. I can easily drag and drop the Samba files onto the client. I would like to automate this process, and accomplish this using an update copy versus a copy full. How can I accomplish this as bash script? I had no luck using the 'cp' command.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved