Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6806 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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???

Posted

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
Posted

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.

  • 1 month later...
Posted

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...

This topic is 6806 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.