On 27/09/14 10:13, Chris Walker wrote:
On Fri, 26 Sep 2014 11:24:24 +0100 Chris Walker alug_cdw@the-walker-household.co.uk wrote:
On Thu, 25 Sep 2014 18:10:23 +0100 Chris Walker alug_cdw@the-walker-household.co.uk wrote:
[]
I found a micro SD card in my old Nokia N900 and stuffed that into the phone and have now successfully done an rsync of various directories from the phone to the sd card.
Problems surfaced here when the device, something with 16GB of memory, managed to fill a 16GB memory card.
In the past I've tried to use an rsync backup command and I've failed to exclude the media I'm backing up onto, which results in a backup that never ends until it's consumed all the disk space, as it backs up everything, including the backup, and as it backs up the backup, the backup gets bigger, which gets backed up....
I'd be tempted to backing up to the SD card again, but create an archive or compressed archive instead on the sd card - this should avoid any file permission problems.
I managed to find a mount.cifs rpm for the phone and installed that. I can now mount my NAS box on the phone but I'm running into more problems with that.
I'm using this command :- /sbin/mount.cifs //192.168.1.25/Linux_Share/Jolla_Backup/Full_Backup -o username=Xxxxxx,password=Xxxxxx,uid=nemo,gid=nemo,sec=ntlm /media/Linux_Share/
If I then look at the output of mount, I see this :- //192.168.1.25/Linux_Share/Jolla_Backup/Full_Backup on /media/Linux_Share type cifs (rw,relatime,sec=ntlm,unc=\192.168.1.25\Linux_Share,username=Xxxxxx,uid=100000,forceuid,gid=100000,forcegid,addr=192.168.1.25,unix,posixpaths,serverino,acl,rsize=61440,wsize=65536,actimeo=1)
I'm using this command to 'sync' the files :- rsync -arv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /media/Linux_Share
I'd be tempted to add /media/Linux_Share to the list of excluded directories, just to be 100% sure that it was excluded from the backup.
But when it runs, I'm seeing lots of these errors :- rsync: chown "/media/Linux_Share/data/app/.me.scan.android.client-1.apk.bqi2SO" failed: Permission denied (13)
This gave me a clue: http://ubuntuforums.org/showthread.php?t=930041
If it's a Samba share, it may just be that you can't do a chown to the files. - You've set the mount's username in the mount command.
Again, I'd be temped to create an archive or compressed archive file on the share. The advantage is the file can be owned by any user, but maintain the real file permissions and ownership within the file.
If I check the attributes of the files on the NAS, they're all shown with my userid and group but how can that be when the phone is issuing these commands and there is no user 'chris' on that?
1) the mount command specifies the mount's user name - this may have something to do with it. 2) Linux stores file ownership via the user number, not the actual name. Create a file on a system with user name sid user ID 1000. Access this file from another system where user ID 1000 is James, and the user owner name of the file will be James, not Sid.
Oh. I should mention that I first issued the command 'devel-su' to run everything as root.
I'm puzzled and would appreciate some help as there's little point in doing a backup if the backup is not worth anything due to wrong permissions.
I can vouch for the usefulness of ES FIle Explorer.
When I've had to backup phones before, I've done it like this. I've attached the phone to a computer using a USB cable. The computer then notices the phone and asks if I want to attach the storage device. I say yes, then create an archive from the mounted phone's drive. This has always worked for me.
Good luck Steve