pietrob71
Posts: 2
Joined: Sun Nov 02, 2014 7:29 pm

USB pen drive cache

Sun Nov 02, 2014 8:02 pm

I use my raspberry to backup some servers through remote filesystems (ftp and sftp) and rsync.
I wrote a php script executed at command line; the script is launced nigthly from crontab. The script sync some remote folders to local folders, than the local folders are zipped and the zip is saved on a pen drive automounted in /media/backup
I've format the pen drive as ext4 and the volume name is "backup".
Everything works fine and I find all daily backup in /media/backup as "YYYYMMDD_hhmmss.zip".

My trouble is: When rasbperry is off, I remove the usb pen drive and I mount it into another linux box, but I can't see the files.

When the USB pen drive is in raspberry, if I connect to it from another pc with Filezilla through sftp, I can see all files and dowload them and the downloaded files are correct and contain all my backuped remote folder.

Another strange thing is: my raspberry has a 64 GByte SD; of these 64 GByte, 34% result occupied as the zip files are phisical saved on SD, but seem saved into USB pen drive.
I think there's some trouble about the cache of usb pen drive, or something similar else.

Can anyone help me?

Thanks in advance
Pietro

jamiesk
Posts: 95
Joined: Mon Nov 26, 2012 8:48 pm
Location: Ipswich, Suffolk, England, UK.

Re: USB pen drive cache

Tue Nov 04, 2014 5:52 pm

Is the USB drive actually mounted there ?

whats a "df -h" show ?

What user were you using on the other PC ? And does is have access to the USB stick ?
Pi1 (Nov 2012 loft)= 1KW immersion controller for Solar panel
Pi2 (Jan 2013 living room)=Play thing
Pi3 (Feb 2013 mobile)= Play thing with Tandy Ladder board,breakout board,Nokia display
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=28193

pietrob71
Posts: 2
Joined: Sun Nov 02, 2014 7:29 pm

Re: USB pen drive cache

Thu Nov 06, 2014 11:24 am

jamiesk wrote:Is the USB drive actually mounted there ?

whats a "df -h" show ?

What user were you using on the other PC ? And does is have access to the USB stick ?
My mistake!

The usb pen drive was not automounted in /media/backup at boot and the zip files were saved in SD card.

I've edit the fstab file to mount my /dev/sda1 on /mnt/backup, than I've modified my script to save zip files in /mnt/backup and now all works great and the files are correctly saved on usb drive.

Thanks

Return to “Raspbian”