Cron to sync folder to buffalo nas drive
I have a buffalo nas drive, that i can access by:
smbclient -U //buffalo/share
Im not sure how i would go about having a folder:
sync to //buffalo/share/files
I figured rsync, but im confused on how to do it to a nas since i cant just say //buffalo/share in the rsync command
I've been reading rsync man pages as I'd like to do a similar thing (to an ftp account on my NAS)
According to the man pages, however, rsync must be installed on both the source and destination machines,
which makes it impossible to use it with NAS, doesn't it?
I've been playing with an Iomega NAS that runs Windows file sharing. Currently I mount the NAS share on a local mount point and then use rsync as if it were syncing two local directories.
stress_junkie, that cmd works good, that is what i found in a tutorial also.
I got that working now.
Im gonna test it with rsync this week and see if i get missing files also, then i will report back.
i cant get:
rsync /test /mnt/buffalo/test
to work, keeps sayin:
skipping directory /test
not sure why yet
rsync -avz /test/* /mnt/buffalo/test
Using that command I got it to copy some files finally.
rsync: chown "/mnt/buffalo/test/nagios/module" failed: Operation not permitted (1)
rsync: chown "/mnt/buffalo/test/nagios/sample-config" failed: Operation not permitted (1)
rsync: chown "/mnt/buffalo/test/nagios/sample-config/template-object" failed: Operation not permitted (1)
rsync: chown "/mnt/buffalo/test/nagios/xdata" failed: Operation not permitted (1)
sent 7417870 bytes received 12978 bytes 316206.30 bytes/sec
total size is 19485183 speedup is 2.62
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]
Now i have alot of files that did not copy, im not sure how to fix it....seems like it is trying to chown the files/folders on the buffalo but does not have permission...I have permission to mkdir but not to chown...
hmmm maybe im not using the admin account on the buffalo, ill look at it tomorrow and post back later...i imagine that is the problem...
mount -t smbfs -o username=root //my250gig/share /mnt/buffalo
16799: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
SMB connection failed
I set the admin password on my buffalo in the web admin, and this is what happens when i try to mount it using it.
If i dont put a password in it will work fine, but when running rsync or rsnapshot it will give me chown messages....
got some different messages
My super user is root of course in debian, but i had to create matthew user also when i installed it.
my super user on the buffalo is also root.
I went into the buffalo and made a user "matthew"
Then i went back in the debian and did:
mount -t smbfs -o username=matthew //192.168.6.112/share /mnt/linkstation
it asked for my password and I put in my matthew password that i use in debian.
And i see with ls -l root is owner now of the folders.
LTS ~ # rsnapshot daily
rsync: chown "/mnt/linkstation/snapshots/daily.0/localhost/test/nagios" failed: Operation not permitted (1)
but im still getting the chown error...errr...
looks like if the source file was user 501 and group 501, it sets the user and group on the buffalo to root instead... i think thats what the problem is, it cant set the permissions like it is on the linux system so it sets it all to root. It looks like all the files are in the backup...
|All times are GMT -5. The time now is 07:09 AM.|