LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2013, 05:45 AM   #1
drhood
LQ Newbie
 
Registered: Oct 2013
Posts: 9

Rep: Reputation: Disabled
rsnapshot fails backup to nfs share


Hello,

I have been trying to work with rsnapshot to complete a backup, but have run into problems, solving them, until now.

Client System
Debian Wheezy
Single user
NFSv4
NFS directory mounted /mnt/backups with rw for user only (see fstab below)
Execute rsnapshot as user (not root)

NFS share mounted in /etc/fstab
Quote:
192.168.x.xxx:/srv/user/backups /mnt/backups nfs rw,hard,intr,udp,nosuid 0 0
Server System
Ubuntu Server 12.04
NFSv4

Content of /etc/exports file
Quote:
/srv/user 192.168.x.xxx(rw,async,no_subtree_check)
The Problem
Below is the rsnapshot error message.

Quote:
user@user:~$ /usr/bin/rsnapshot daily
require Lchown
Lchown module loaded successfully
Setting locale to POSIX "C"
echo 3581 > /home/user/rsnapshot.pid
/bin/rm -rf /mnt/backups/daily.6/
mv /mnt/backups/daily.5/ /mnt/backups/daily.6/
mv /mnt/backups/daily.4/ /mnt/backups/daily.5/
mv /mnt/backups/daily.3/ /mnt/backups/daily.4/
mv /mnt/backups/daily.2/ /mnt/backups/daily.3/
mv /mnt/backups/daily.1/ /mnt/backups/daily.2/
/bin/cp -al /mnt/backups/daily.0 /mnt/backups/daily.1
/bin/cp: preserving times for `/mnt/backups/daily.1/localhost/home/user/Pictures': Invalid argument
/bin/cp: preserving times for `/mnt/backups/daily.1/localhost/home/user': Invalid argument
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot daily
----------------------------------------------------------------------------
ERROR: /bin/cp -al /mnt/backups/daily.0 /mnt/backups/daily.1 failed (result 256, exit status 1). Perhaps your cp does not support -al options?
ERROR: Error! cp_al("/mnt/backups/daily.0/", "/mnt/backups/daily.1/")
/usr/bin/logger -i -p user.err -t rsnapshot /usr/bin/rsnapshot daily: \
ERROR: Error! cp_al("/mnt/backups/daily.0/", "/mnt/backups/daily.1/")
rm -f /home/user/rsnapshot.pid
As can be seen, the problem is with my Pictures folder and some file in my home folder.

For the life of me, I cannot see what is the problem in my Pictures folder, which is below.

Content of /home/user/Pictures
Quote:
-rw-rw-r-- 1 user user 93481 Sep 8 06:53 20130825_001c.jpg
-rw-rw-r-- 1 user user 333926 Sep 7 19:27 20130825_001.jpg
-rw-rw-r-- 1 user user 554879 Jan 27 2013 21_oct.jpg
-rw-rw-r-- 1 user user 127868 Jan 27 2013 dixie_proj1.jpg
-rw-rw-r-- 1 user user 581987 Jan 27 2013 DSC00042.JPG
-rw-rw-r-- 1 user user 2751389 Aug 4 2011 DSCN3295.JPG
-rw-rw-r-- 1 user user 1143992 Aug 4 2011 DSCN3308.JPG
-rw-rw-r-- 1 user user 1401005 Aug 3 2011 DSCN3313a.jpg
-rw-rw-r-- 1 user user 50379728 Aug 2 2011 DSCN3313.xcf
-rw-rw-r-- 1 user user 1254637 Aug 2 2011 DSCN3334a.jpg
-rw-rw-r-- 1 user user 628859 Aug 2 2011 DSCN3375a.JPG
-rw-rw-r-- 1 user user 869112 Sep 17 2011 DSCN3456a.jpg
-rw-rw-r-- 1 user user 12678086 Sep 17 2011 DSCN3456aJPG.xcf
-rw-rw-r-- 1 user user 518521 Sep 17 2011 DSCN3519a.jpg
-rw-rw-r-- 1 user user 514855 Sep 17 2011 DSCN3528a.jpg
-rw-rw-r-- 1 user user 454227 Sep 7 18:22 DSCN4278c.JPG
-rw-rw-r-- 1 user user 498442 Sep 7 18:23 DSCN4279c.JPG
-rw-rw-r-- 1 user user 614995 Sep 7 18:24 DSCN4285c.JPG
-rw-rw-r-- 1 user user 431670 Sep 7 18:25 DSCN4287c.JPG
-rw-rw-r-- 1 user user 446322 Sep 7 18:30 DSCN4288c.JPG
-rw-rw-r-- 1 user user 540794 Sep 7 18:26 DSCN4289c.JPG
-rw-rw-r-- 1 user user 603922 Sep 7 18:28 DSCN4293c.JPG
-rw-rw-r-- 1 user user 682247 Sep 7 18:29 DSCN4297c.JPG
-rw-rw-r-- 1 user user 702153 Sep 16 04:55 DSCN4303.JPG
-rw-rw-r-- 1 user user 275614 Sep 16 05:01 DSCN4303s.JPG
-rw-rw-r-- 1 user user 709942 Sep 16 04:55 DSCN4305.JPG
-rw-rw-r-- 1 user user 282616 Sep 16 05:02 DSCN4305s.JPG
-rw-rw-r-- 1 user user 76160 Jan 27 2013 Eves_Closet1.jpg
-rw-rw-r-- 1 user user 152864 Jan 27 2013 Eves_Closet.jpg
-rw-rw-r-- 1 user user 127699 Jan 27 2013 feather_star_10.jpg
-rw-rw-r-- 1 user user 201095 Sep 8 17:17 FF_Poem.JPG
-rw-rw-r-- 1 user user 4121213 Jan 27 2013 HPIM5672.JPG
-rw-rw-r-- 1 user user 23154 Jan 27 2013 lookingback1.jpg
-rw-rw-r-- 1 user user 75327 Jan 27 2013 lookingback2.jpg
-rw-rw-r-- 1 user user 44219 Jan 27 2013 lookingback3.jpg
-rw-rw-r-- 1 user user 51763 Jan 27 2013 lookingback4.jpg
drw-rw-r-- 2 user user 4096 May 1 2013 smplayer_screenshots
-rw-rw-r-- 1 user user 114088 Jan 27 2013 The_Cemetery.jpg
-rw-rw-r-- 1 user user 110890 Jan 27 2013 The_Hat_That_Was_A_Crow.jpg
-rw-rw-r-- 1 user user 671310 Jan 27 2013 Witch_Proj.jpg
-rw-rw-r-- 1 user user 182340 Jan 27 2013 Yellow_Bird_close_up.jpg
-rw-rw-r-- 1 user user 105521 Jan 27 2013 Yellow_Bird.jpg
Request
Need help brainstorming on potential causes or possible work around. For instance..

Could this problem be due to running rsnapshot on the client as a user rather than root?
Could this problem be due to rw only access?

Possible solutions will be greatly appreciated.

With kind regards,

drhood
 
Old 11-04-2013, 08:54 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
did you read the error msg?

Code:
/bin/cp -al /mnt/backups/daily.0 /mnt/backups/daily.1 
/bin/cp: preserving times for `/mnt/backups/daily.1/localhost/home/user/Pictures': Invalid argument
/bin/cp: preserving times for `/mnt/backups/daily.1/localhost/home/user': Invalid argument
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot daily 
----------------------------------------------------------------------------
ERROR: /bin/cp -al /mnt/backups/daily.0 /mnt/backups/daily.1 failed (result 256, exit status 1). Perhaps your cp does not support -al options?
ERROR: Error! cp_al("/mnt/backups/daily.0/", "/mnt/backups/daily.1/")
/usr/bin/logger -i -p user.err -t rsnapshot /usr/bin/rsnapshot daily: \
ERROR: Error! cp_al("/mnt/backups/daily.0/", "/mnt/backups/daily.1/") 
rm -f /home/user/rsnapshot.pid
it is telling you right there what the problem is. try running the command manually and see what happens

Code:
$ /bin/cp -al file_to_copy_source /path/to/destination/name.foo
if it works, then there is a problem with the backup software. i dont see why its bothering with cp, way heavier on the system, then rsync. does a much safe job plus has checking points for the connection goes down for what ever reason as you are backing up to a NFS share meaning not a local resource inside your computer, but in your LAN/WAN.
 
Old 11-09-2013, 01:17 PM   #3
drhood
LQ Newbie
 
Registered: Oct 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
[Solved] Moved to backintime

Thank you lleb!

I did the cp -al command manually in a terminal and no errors occurred. I took note of the comment on cp and moved from rsnapshot to another backup tool (backintime) that only uses rsync.

For those interested, I like rsnapshot; however, it doesn't appear to be the best suited tool for my situation (i.e., user backing up /home/user to an nfs shared folder (user permissions only) mounted locally. As explained in the OP above, I could not figure how to resolve the cp -al errors when running rsnapshot as a user. Rsnapshot works great on my server where root is backing up to a usb drive.

Although I did not think I would like backintime, after trying it out, backintime is a tool that works for me. I wanted a back up tool that (a) used rsync, (b) did not require running in the background, (c) did not encrypt so that I can restore manually via a file manager if needed, and (d) supported daily/weekly/monthly backups. Backintime meets all of these and is dead simple to configure.

Two other backup tools I looked at but did not end up using were deja vu and luckybackup.

Thanks again.

Last edited by drhood; 11-09-2013 at 01:18 PM. Reason: Add title
 
Old 11-10-2013, 01:20 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
glad to have helped. i personally just create simple bash scripts to backing up to NFS/NAS locations via all of my Linux workstations and my web server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nfs share of root filesystem fails jason_not Linux - Server 2 09-01-2013 10:57 AM
[SOLVED] CentOS fails to mount NFS share on boot dmz1213 Linux - Server 4 08-26-2012 03:42 PM
NFS share in fstab fails to mount, but where is the log? gumpish Linux - Software 7 08-19-2009 07:22 PM
backup question - NFS share in Ubuntu 9.04 backup to READYNAS NV+ newellrp1 Linux - Newbie 3 05-19-2009 03:57 PM
Tar backup to NFS share problem Liane Linux - Newbie 4 05-04-2009 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration