Tony T wrote: 
> I have my files on an attached USB drive, and I created a directory for
> the files (/mnt/MUSIC/FLAC) and a dir for my script and backups
> (/mnt/MUSIC/Other)
> My script is simply 
> > 
Code:
--------------------
  >   > 
  > # backup.sh
  > tar -chzvf /mnt/MUSIC/Other/piCorePlayer_Backup.tgz \
  > /mnt/MUSIC/Other/ \
  > /mnt/MUSIC/Playlists/ \
  > /usr/local/slimserver/prefs/ \
  > /mnt/CACHE/slimserver/prefs/ \
  > /mnt/mmcblk0p2/tce/mydata.tgz
  > # backing up usr/local/slimserver/prefs/ is redundant 
  > 
--------------------
> > 
> 
> In Tweeks, I have a cron to Tar weekly (0 1 * * 0
> /mnt/MUSIC/Other/backup.sh)
> 
> And on another pi, I copy over the backup with rsync, with a cron of 
> > 
Code:
--------------------
  >   > 
  > # rsync piCorePlayer Backup from piCorePlayer every Sunday at 2am
  > 0 2 * * 0 /usr/bin/rsync -a 
tc@picoreplayer:/mnt/MUSIC/Other/piCorePlayer_Backup.tgz /home/pi
  > 
--------------------
> > 

Tx again. I tried with a simplified version of the above, but the script
fails unfortunately, even though the direct cmd works fine.

My embarrassment of Unix rustiness follows ... but I did at least recall
chmod +x after (ahem) 20+ years.


Code:
--------------------
    
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ cat backup.sh
  # backup.sh
  tar -chzvf /mnt/mmcblk0p2/tce/backup/piCorePlayer_and_LMS__Backup.tgz \
  /usr/local/slimserver/prefs/ \
  /mnt/mmcblk0p2/tce/mydata.tgz
  
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ ./backup.sh
  -sh: ./backup.sh: Permission denied
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ ls -l
  total 4
  -rw-r--r--    1 tc       staff          145 Sep 11 22:05 backup.sh
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ chmod +x backup.sh
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ ./backup.sh
  : No such file or directory
  tar: error exit delayed from previous errors
  ./backup.sh: line 3: /usr/local/slimserver/prefs/: Permission denied
  : not found: line 4: /mnt/mmcblk0p2/tce/mydata.tgz
  
  
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ tar -chzvf 
/mnt/mmcblk0p2/tce/backup/piCorePlayer_and_LMS__Backup.tgz 
/usr/local/slimserver/prefs/ /m
  nt/mmcblk0p2/tce/mydata.tgz
  tar: removing leading '/' from member names
  usr/local/slimserver/prefs/
  usr/local/slimserver/prefs/favorites.opml
  ...
  mnt/mmcblk0p2/tce/mydata.tgz
  
  tc@PCP-XLR-LMS:/mnt/mmcblk0p2/tce/backup$ ls -l
  total 48
  -rwxr-xr-x    1 tc       staff          149 Sep 11 22:11 backup.sh
  -rw-r--r--    1 tc       staff        43066 Sep 12 10:45 
piCorePlayer_and_LMS__Backup.tgz
  
--------------------


------------------------------------------------------------------------
mr-b's Profile: http://forums.slimdevices.com/member.php?userid=10044
View this thread: http://forums.slimdevices.com/showthread.php?t=112456

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to