February 27, 200619 yr Newbies Hi, I need to program an automated backup and archive routine in bash script. Unfortunatly, it does not work and it give me error codes but I can't find the significance of those codes anywhere. I hope you can help me. #!/bin/bash FileToBackup="Test/ Backup.fp7" RootBackupFolder="/BackupFM" BackupFolder="$RootBackupFolder"`date +%d`" mkdir -p $BackupFolder chmod 777 $BackupFolder fmsadmin BACKUP "$FileToBackup" -d "BackupFolder" #-----------end of script ------------------------ I don't know why, but I always get a "Error: 20500" when I execute the script file. Can anyone help me???
February 27, 200619 yr NEVER copy a live hosted FMP file. Instead, create a schedule in FMP to backup the file to another folder. You can then do whatever you want to this backup copy.
February 28, 200619 yr Author Newbies Hi, I'm not doing a copy of the hosted file. I'm using the Terminal command BACKUP from the command line "fmsadmin" application to create a backup of the file, just like the GUI version of FMS Admin does with backup schedule tasks.
April 5, 200619 yr Hi, #!/bin/bash FileToBackup="Test/ Backup.fp7" RootBackupFolder="/BackupFM" BackupFolder="$RootBackupFolder"`date +%d`" mkdir -p $BackupFolder chmod 777 $BackupFolder fmsadmin BACKUP "$FileToBackup" -d "BackupFolder" #-----------end of script ------------------------ I don't know why, but I always get a "Error: 20500" when I execute the script file. Can anyone help me??? Some ideas: 1. does the script work when you try it one line at a time via the terminal? If not, what step gives the error? 2. you probably need to "cd" to the right folder at the first line 3. chmod 777 is dangerous, gives the world both read and write access to the file on a multi-user system. I'd suggest 770 or perhaps 740 ? 4. permissions -- who owns the script, and who owns the folder. they need to be owned by and writeable for the fmsadmin group. check and change permissions in finder using the "get info" command...
Create an account or sign in to comment