Newbies PMC Posted February 27, 2006 Newbies Posted February 27, 2006 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???
Vaughan Posted February 27, 2006 Posted February 27, 2006 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.
Newbies PMC Posted February 28, 2006 Author Newbies Posted February 28, 2006 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.
xochi Posted April 5, 2006 Posted April 5, 2006 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...
Recommended Posts
This topic is 6815 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now