Ubuntu :: Permissions With Rsync On Backup

Jun 18, 2010

I'm trying to learn how rsync works to backup my system. I tried:
Code:
rsync -azvv /home /media/Elements
I get a folder called home on my external hard drive but when I use ls -l to see the permissions they are all wrong.
On my /home folder the permissions for /nathan are
drwxr-xr-x 48 nathan nathan
The permissions on the backup /nathan folder are
drwx------ 1 nathan nathan

I also tried using the long version of -a which is -rlptgoD and that didn't work either. What do the 48 and 1 mean when I used ls -l? When I look in the /nathan folder the permissions are all screwed up too. A lot of the files are backed up as executable and the permissions are all screwed up. I also ran it with sudo, and that didn't work either. The permissions were still screwed up and ownership is messed up too.

View 3 Replies


ADVERTISEMENT

Ubuntu Servers :: Rsync Backup - Transfer Files With Appropriate Permissions

Dec 4, 2010

I wrote a script to wake up my windows machine and do an rsync backup of some of my files. I wanted to make this command a accessible through local bin so I made it executable. However the problem is that when I copies files is copies them with root permissions and i can edit or delete them. How can I set the files so they transfer with the proper permissions for my Ubuntu user?

Code:
#!/bin/bash
# Description: This script first wakes up the client machine and syncs the appropriate folders.
# Finally the script shuts down the client if it was off to begin with.
if [ "$(whoami)" != "root" ]; then
echo "Permission Denied"
exit 1
fi .....

View 8 Replies View Related

Ubuntu :: Permissions For Rsync And BackinTime - Setup 2nd HD With Correct Permissions?

May 31, 2011

Problem: permissions for rsync and BackinTime. Setup: Ubuntu 11.04, Two internal HD, #1=main, single boot, #2=backup drive. Question: How do I set up my 2nd HD with correct permissions? Background: I had previously a dual boot XP+10.04 with a 2nd HD formatted as NTFS. With this I was able to use my rsync and backintime to my 2nd HD with no issue. My new set up is EXT4 on both HD.

(I even tried to reformat my 2nd HD as NTFS, but that didnt fix the issue) I followed [URL] to mount the 2nd HD and get permissions. But now when I run backintime i get this error: [E] Error: rsync: opendir "/home/myhome/.ssh" failed: Permission denied (13) I did my requisite reading for a newbie, and am stuck. I ran backintime as root, and it backed up ok. How do I run my user version of backintime? (i.e. How do I fix the permission issue?)

View 9 Replies View Related

Ubuntu :: Using Rsync For Backup?

Mar 2, 2010

I saw in a magazine reference to using rsync to have identical copies of folders. This looks like something I could find useful as I have a large number of items in need of safe backup.

I have the folders on an old system on a home network and would like to copy these over to a USB Hard Drive.

Currently the folders reside on SFTP xxx.xxx.xxx.xxx and I wish to sync them to a USB port on my laptop.

View 9 Replies View Related

Ubuntu :: Backup Using Rsync

Aug 2, 2010

I have a samba share to a windows 7 computer I do not know if I will be able to use backintime or not so I want to know how to have rsync do my backup.I read the man but I'm not sure if I understand the it.on same computer different hard drive to run every hour in a script. Leanne is windows 7 share and backup is the other hard drive in the computer rsync -arvRzEP /media/leanne /media/backup.

View 1 Replies View Related

Ubuntu :: Rsync Backup Server

Jul 20, 2010

This should be a quick one. I'm trying to backup a single directory and it's subdirectories on my Lucid Server to a freenas box across my network. This is what I'm using to do that rsync -r -a -v -z * --delete freenas: DSIBackups..It almost works perfectly except for one problem. When a file is deleted at the source, this command doesn't seem to delete it on the receiving end. I assumed that the --delete would do that but aparently not.

View 1 Replies View Related

Ubuntu :: Rsync Like Incremental Backup

Oct 20, 2010

when rsync is finished the update, or in the meantime - i need to move the updated files to a different location - like date +%Y%m%d something or what ..the reason is, because of the development, i need the modified files, but all of them, not just the last one - so i have to store them daily, but i dont want to store the whole dir - just that few files which are updated does it make sense?

View 5 Replies View Related

Ubuntu :: Use Rsync To Backup Home Directories To A Nas?

Apr 14, 2010

I'm hoping somebody can find something here that I haven't. I'm trying to use rsync to backup home directories to a nas. First, I NFS mounted the nas and ran an rsync and everything worked out fine. the transfer completed after a few hours and everyting was transferred (lots of stuff!). I then decided that I don't want to leave the nas mounted all the time and I didn't want to automate mounting and unmounting of the nas as I didn't think I could produce a script that would work reliably enough. So I decided to start an rsync daemon on the nas and upgrade via that. I run the following command (results are included. the ^C is me killing it after it hangs).


Code:
ryan@server:/etc/backup$ sudo rsync -ax --stats --progress --delete /data root@192.168.0.98:backups1
root@192.168.0.98's password:
sending incremental file list
data/home/user/Documents/
data/home/user/Documents/The File.wmv

[Code]...

View 3 Replies View Related

Ubuntu :: Backup Files To Ntfs With Rsync?

May 31, 2010

well, i know ther are issues when using rsync to copy files to ntfs partition like file permission blah blah. the thing is, i need to backup my music files periodically onto a ntfs partition from ext4. i really dont care about file permissions or any other stuff. when i use rsync, it should update the mp3 files on my ntfs (external) disc with the new ones.can i give a go with this operation? i have lot more important files on the external disc and i dont want this rsync corrupt or delete those files coz they are highly important files.

View 2 Replies View Related

Ubuntu Servers :: RSYNC With Archive Backup

Sep 15, 2010

I have a Linux host acting as an ISCSI server for a Windows box. I want to keep an off site backup, so I figure rsync will keep the ISCSI server synced with an offsite Linux host. I understand that Rsync does block level incremental transfer to conserve bandwidth ok, awesome.The trick is, that I also want an archival copy kept. Say I want to go back to a revision of a file from 10 days ago, I need to be able to do that.

I was planning on using Backup Exec, since we currently have a licensed copy. Throw the archives from Backup Exec onto the ISCSI server as well, and have it keep a rotating 30 day backup, or something like that. The issue I see here is that this will be creating a deleting files as it does its daily backup rotation. I'm guessing RSYNC will see these as new files, and likely retransmit everything on a daily basis. The question then becomes, is this assumption correct, or will it still know to do a block level incremental transfer even when file names and such are changing?

View 5 Replies View Related

Ubuntu :: RSYNC Error - Backup Failed

Jan 29, 2011

Our backup script was working fine (ssh to the server, back up /home to a second hard drive on my computer). Then right after an ubuntu update, it quit working. I investigated and found that "something" had changed the label on the backup hdd to what looked like gibberish to me. But the script identified the backup hdd by its uuid, which didn't change. Yet, here is the error I get when the backup fails: receiving file list ... done [took about 5 seconds] rsync: mkdir "/media/14D9-3B1F/server-backup" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(594) [receiver=3.0.6]

Note that the backup hdd IS mounted, uuid is correct, and the folder 'server-backup' DOES exist. Does anyone have a clue for me? I'm moderately experienced in Linux and ubuntu. Our server runs centos 5. And as stated, the backup ran fine for several weeks. I think there was a new linux kernel on that update, but at this point a while later I don't know which one. Current kernel is .2.6.31-22-generic.

View 1 Replies View Related

Ubuntu Servers :: Any Way To Encrypt Backup Using Rsync

Feb 4, 2011

I support a small business which has an Ubuntu server running as a file server. The server is running Ubuntu 10.4. There is one hard drive which is mounted as /media/hdd. Each night this is backed up to an external USB hard drive mounted as /media/backup. The backup is carried out using the command:

Code:
rsync -av /media/hdd/ /media/backup/

Is there a way to encrypt this back-up so that if the USB hard drive is plugged into another machine it cannot be read?

View 5 Replies View Related

Ubuntu :: Rsync Backup Ends In Busy Box?

Jul 30, 2011

i am trying to keep a backup of my root on a second partition using rsync.

sda1 system
sda2 system-BAK
sdb1 /home

[code]....

View 3 Replies View Related

Software :: Rsync -a Does Not Seem To Preserve Permissions

Jun 12, 2011

I know rsync generates a lot of questions, but I have not found an answer to this one about whether the archive option (rsync -a) ever misbehaves. I am transferring data from field instruments running Debian etch to a central server running Debian lenny. My command is below:
Code:
rsync -av --remove-source-files --log-file=rsync_20110612_0656Z.log ./20100616/ archive@bigserver:/mnt/ZAP_DATA/20100616/zap2/

After rsync runs, the directories it touches on bigserver have very strange permissions
as follows:
Code:
d-wxrw--wt 2 root root 4.0K 2010-10-26 04:31 20101026

This says that directory 20100226 can be written by anybody, but can't even be read by its owner! I thought rsync was messing things up, but in the process of writing this question I discovered that the original files that I am trying to sync have these crazy permissions. So I no longer have a question, but if future LQers think that rsync -a is messing up their permissions, this post may confirm that it is merely copying their messed up permissions from somewhere else, as it is supposed to do!

View 1 Replies View Related

Ubuntu :: Rsync Creating Wrong Permissions For Directories?

May 1, 2010

I try to use rsync for backing up some directories and I have to following problem: some files have permissions that prevent me from running rsync under my own user id. So I run it under root using the option "-a" which according to the man page should preserve the permissions, owner and group information:

However, when I run this under root, the directories created in the backup location get user root and group root while ordinary files keep the original user and group. What am I missing here? How can I get rsync to preserve the user and groups for all files, including directories?

Here is a command to illustrate my problem
Code:
sudo rsync -a /home/youruser /tmp

If you try that and terminate with Ctrl-C after a few seconds, there will be a directory /tmp/youruser where the directories contained within are owned by root group root.

View 2 Replies View Related

Debian :: Backup Server With Rsync And Ssh

Jan 18, 2016

I switched last summer from Windows (used it since Windows 95) to Debian. I'm using Debian Jessie for a couple of months now and I'm getting used a little.

There are problems here and there, but I can solved them with some reading on the web. Not really a big problem...till now

I run Debian 8.2 om my PC (PC1). Bought an older PC (PC2) that I want to use as a backup server.

I'm using PC2 only for making backups, after the backup I switch it off again.

So I installed Debian 8.2 (net-install without DE and with SSH) on PC2 and tried to configure it to let it work as my backup location. Made a public SSH key and exported it to the root account (no problem) and to the user account (sensdeb), but there was an error "Access Denied"

Gave the user (sensdeb) sudo-rights via visudo file

# User privilege specification
root ALL=(ALL:ALL) ALL
sensdeb ALL=(ALL:ALL) ALL

I installed rsync.

The problem is that Rsync only works when I use the root account.

Code: Select allrsync -r -n -t -v --progress --delete -u -l -H -s /media/Data/Mp3/Anastacia root@192.168.1.102:/test/Mp3

When I try to sync with he normal user account sensdeb

Code: Select allrsync -r -n -t -v --progress --delete -u -l -H -s /media/Data/Mp3/Anastacia sensdeb@192.168.1.102:/test/Mp3

I get error's. Access Denied

I don know how to give the user sensdeb the rights so that I can use that account for my backup tasks. Now it's possible to sync with the root account, but that should not be the way to do it, I read many times.

View 7 Replies View Related

OpenSUSE :: Rsync Backup : Upgrade To 11.4 64 Bit?

Mar 14, 2011

had some 'files disappearing' probs for rsync after upgrade to openSuSE 11.4 - solution seems to be to add :

--exclude=/var/lib

View 1 Replies View Related

General :: How To Do Rsync-like Encrypted Backup

Feb 27, 2011

I want to save a backup of my data on a remote server, but never want the backup server to see the data unencrypted. Editing a single file and backing up should not result in everything being encrypted and sent again. The remote server should preferably not even know the directory structure (and especially not the directory names).

View 2 Replies View Related

General :: Three Stage Backup With Rsync?

Jul 13, 2010

I've been trying to make a three stage backup with stage 0 being a full monthly back up, stage 1 being a weekly backup, and stage 2 being a daily backup. I've been trying very hard to use rsync for this but sorting files by date is proving to be problematic. Sometimes it seems to work from the command line directly, but the same command causes errors and warnings from a script while entirely failing to sort the correct files.

The common example I see for this involves commands like this:

Code:
rsync -Rav `find /home/ -ctime -7 -print` /path/to/home_backup The problem seems to be that since the user directories in /home contain files that have been altered within the time frame specified the whole directory is matched first which means that the whole directory is recursively archived as opposed to just the changed files.

I've also seen examples using the --files-from tag using the same find parameters and this one seems to ALMOST work but gives me strange warnings and fails to run at all when launched from a script.

Many of the things I've googled about using rsync to backup stuff by the date modified involves a rather snarky "You're missing the point of rsync!" to which I respond by yelling at my computer monitor followed by "JUST TELL ME WHAT I NEED TO KNOW!" I understand that rsync is meant to take care of incremental backups on it's own, that's why I want to use it specifically for a traditional 3 stage backup scheme.

View 5 Replies View Related

Security :: Backup Securely With Rsync?

Jul 11, 2010

To copy from production to standby over the internet I use a cron job doing rsync -avze 'ssh -p 8022' --exclude-from= ....

My question is: should the cron job run on the production or the standby system. Root access to the remote system is given by a pass phrase-less ssh key. Currently I run rsync on the production system. I guess that it is more secure because the standby needs no ssh login to production. Running rsync on the standby would use less resources on production. I am concerned that in this case there would be pass phrase-less access from standby to production.

View 3 Replies View Related

Software :: Restoring An Rsync Backup

Jul 10, 2011

I'm doing an rsync backup to an external drive in order to take a shot at setting up partition encryption. My rsync command is, as root: Code: rsync -av / /external1/backup.Once I've finished my cryptsetup and done a fresh Linux install, what command should I use to properly restore my backup (without messing up the encryption setup)?

View 1 Replies View Related

Ubuntu Servers :: Rsync - Backup Only Changed Blocks?

Aug 10, 2010

I'm going to make a nightly backup copy from one server to another, using rsync. If I have a sufficiently large file, say 4+ GB or so, I'm not interested in copying the whole file if only a small change has been made. Can rsync detect small changes on block level and backup only those if needed?

View 2 Replies View Related

Ubuntu :: Using Rsync To Backup The Local Home Directory?

Oct 14, 2010

I went ahead and created this directory

mkdir /tmp/rsync-backup

and, ran this

rsync av /home /tmp/rsync-backup

this is the result

rsync: link_stat "/av" failed: No such file or directory (2)
skipping directory home
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]

View 5 Replies View Related

Ubuntu :: Rsync For Initial Backup Then Maintenance Backups?

May 9, 2011

So I am using rsync (3.0.7 on MAC OSX) to backup one hard drive to a folder on another one. The is USB drive to USB drive and I have done the initial backup from one drive to a new formatted other drive with the following command:

Code:
rsync -avX --progress /Volumes/Source /Volumes/Destination
This all appears to be going smoothly as I type. I am going to write a script to do subsequent backups in the

[code]....

View 2 Replies View Related

Ubuntu Networking :: Mount Windows PC To Backup Using Rsync

Jul 1, 2011

I want to backup windows PC's in my network to my ubuntu 11.04 pc, using rsync. Rsync is working, but I have to mount the pc's. A few details.
My server is named: server
The windows pc is named: \PC_OF_MARTIJN
The folder where the mount is coming is: /home/bastiaan/backup/mounts
Credentials are in /home/bastiaan/backup/credentials and they're called: martijn

So what I'm going to add to /etc/fstab is this:
Code:
//server \PC_OF_USER /home/bastiaan/backup/mounts/user cifs credentials=/home/bastiaan/credentials/user,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Will this work?

View 4 Replies View Related

Red Hat / Fedora :: Permissions With CIFS Share And Rsync

Jan 28, 2011

am trying to sync data from Server A to Server B. The destination on Server B is a CIFS share and I need to preserve timestamps, permissions, etc. on all the data that I transfer. During the rsync process, I receive thousands of errors like the one below:
rsync: chown "/LBDCASAN001/JasonHarper/files/1259810304676/2010-12-22-01-00-03/0x22/0xc8/0x43/0x0a" failed: Permission denied (13)

I'm not sure if it's related at all, but my mount point on Server B has the permissions set as: drwxr-xr-x 2 root root when it is unmounted. When I mount the CIFS share, the mount point permissions change to: drwxrws---+ 3 root root

Also, here is the line from my /etc/fstab that mounts the share:
//X.X.X.X/LBXXXXX001 /LBXXXXX001 cifs username=LBXXXXX001,password=XXXXXXX!,uid=0,gid=0 0 0
When I perform the rsync, I'm authenticating to Server B from Server A as root.

View 6 Replies View Related

General :: What Is Rsync Flag To Ignore Permissions

Apr 8, 2010

I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.
/backup is a mounted ftp directory

Below is the current command and output:
Code:
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/ .....
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not permitted (1) .....
sent 211115 bytes received 274 bytes 7686.87 bytes/sec
total size is 210263 speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]

View 3 Replies View Related

Software :: Transferring File Permissions Using Rsync

Feb 3, 2010

I am using rsync to backup data from a file server to a external device, the data is accessed from windows boxes via samba with their own usernames, user1, user2 etc... Rsync is failing to copy the file permissions when sending to the external device, I have tested sending to a ftp server and a usb hard drive and received the same error, see below:

Code:
root@Fileserver:~# rsync -avz --delete-after /shared/fileshare/ /backup/backup
building file list ... done
./
manager/
rsync: chown "/backup/backup/manager/cronman.txt" failed: Operation not permitted (1)
public/ .....
sent 339 bytes received 104 bytes 886.00 bytes/sec
total size is 4593 speedup is 10.37
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
When I backup to a local directory the permissions are copied correctly.

View 4 Replies View Related

Software :: RHEL 5.5 - Rsync Not Retaining Permissions

Jan 28, 2011

I've got an older RHEL 5.5 server that we're using for our company email server. We're going to retire this server and I've created a new Debian Linux server as it's replacement. Now I'm trying to rsync all the users /home/ directories to the new server however when I tested this, I noticed a problem. In the old source server where I'm running the actual rsync command from, everyone's home directory is owned by their unique UID and a generic GID (100 = users). So when I execute this command on the old RHEL 5.5 server:

Code:
rsync -e ssh -avz /home/* root@192.168.0.101:/home

Why are all the users home directories being owned by root:root on the target server? It's not owned by root:root on RHEL 5.5 and the only thing I can think of is my rsync command is wrong. According to the man page, I can see that using the -a switch should preserve all file ownership and much more. It's not doing this on the target Debian server. If it tries to copy over /home/bob and it's owned by bob:users, if Debian didn't know or have a UID for Bob, wouldn't it just assign a UID from RHEL 5.5 to the Debian server? So like /hone/bob would be owned by 1009:users?

View 3 Replies View Related

Ubuntu :: Use Rsync & Ssh To Move A Backup Folder Some Computers To A Server?

Mar 13, 2010

I am trying to use rsync & ssh to move a backup folder some computers to a server. I found a command that is supposed to do this, but I am having issues getting it to work.

Code:
rsync -avz -e 'ssh -p 'port' 'username'@'hostname' ' /source/path host:/destination/path

View 2 Replies View Related







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