Postfilebackup not executed SOLVED

I’m investigating Urbackback since a couple of days and I intend to backup multile machines with it.
So far, I’m really impressed about the scope of functionality. Many Thanks for that great application.
Testing various scenarious I unfortunately cannot get the postfilebackup job on the client working, neither for full backup nor for incremental backup.
The client is a debian9 based Proxmox server and it ist most important to stop certain processes before backup and restart them after backup.
The Backup itself shows no errors, so I assume the postfilebackup should be executed.
Any help in getting this up and running is highly appreciated. After solving this, I could go live with urbackup.
PS: I have seen two entries in the forum referring to a similar issue, but there are no answers yet
Many thanks in advance :slight_smile:

Where did you put it? Did you make it executable?

I have put it into the folder /usr/local/etc/urbackup/. There I put both files, prefilebackup and postfilebackup. Both are executable.
After your response
I have started over from scratch and here is what I did:

  1. make full file-backup of the client machine initiated by the server
  2. shut down client
  3. make a new Proxmox (Debian9) installation on the client
  4. download urbackup-client from server and run script on client
  5. change config file /etc/default/urbackupclient
  6. shutdown and restart urbackup-client
  7. copy scripts prefilebackup & postfilebackup to /usr/local/etc/urbackup and make them executable
  8. Initiate full backup or incremental
    =>> only prefilebackup is executed, even if backup had no errors and no warnings (web gui of server)

Logfile of urbackup-client seems ok to me, the only questionable line says:
2017-11-27 18:22:31: rc=0 hasError=true state=0

Anything wrong what I did?

Thanks a lot :slight_smile:

Just checked (with 2.2.3) and it worked for me.
If it fails to execute the postfilebackup script it won’t show any error in the log as it is run asynchonously.

Many thanks for testing that :slight_smile: Unfortunately I’m not making any progress.
I have spent almost the hole day in testing and investigating this further. Unfortunately this is extremly time consuming, because the backup runs at an incredible low speed, even if I backup just a few GB. I have made complete fresh installations of server and clients, but nothing changes. As the prefilefackup is executed, I assume I have placed the files into the correct directory. Both are executable and work. I’m running out of any ideas, what else I could try. I would appreciate any advice, what I could try to get this running.
Thanks a lot :slight_smile:

I assume you can run /usr/local/etc/urbackup/postfilebackup from the shell?

Yes, I have just re.checked this.

Just recognised, that you are referring to 2.2.3. Is that the version of the client? My clients are 2.1.16.
I understand that 2.1.16 is the most recent client release, correct?

Most recent versions are theses ones : Server 2.2.5 beta/Client 2.2.3 beta
Stables starts to get quite old

Thanks for your answer. I was not aware, that stable release is so far behind. I’m working with urbackup sind a few days, so a lot to learn, before I can really use it.
Where can I find the most recent beta versions. Via google I could only find 2.2.2 beta.

Need to look up the testing forum category

Found it already, thanks :wink: Server and client fresh installed from scratch. Test result:

  • backup takes now app. 11% longer than before (performance is quite bad)
  • postfielbackup still not executed

What am I doing wrong??? I have no idea anymore, what I could do.
I urgendly need to be able to execute scripts before and after backup.
Any idea?

You could run it with strace -f -p PID attached. That should show the error.

ok, took me some time, I’m not an expert, but you are turning me into an expert :wink:
I have tracked the traffic and filtered the following line:
[pid 28959] execve("/usr/local/etc/urbackup/postfilebackup", ["/usr/local/etc/urbackup/postfile"…, “0”, “”], [/* 18 vars */]) = -1 ENOEXEC (Exec format error)

I have copied and pasted from that line /usr/local/etc/urbackup/postfilebackup and the file was immediately executed.
I don’t really understand the output of the trance, however compared to the counterpart of prefilebackup, something seems to be wrong:
execve("/bin/sh", [“sh”, “-c”, “”/usr/local/etc/urbackup/prefile"…], [/* 18 vars */]) = 0

Anything further I can do?

Well, what is the first line in /usr/local/etc/urbackup/postfilebackup ?

unbelievable … a typo… #$/bin/bash
For whatever reason the debian doesn’r care and executes the file.
I have tested it with the correct syntax and yeahhh, it works perfectly :slight_smile: :slight_smile: :slight_smile:
I apologize for that, I have spent almost two full days in searching this little mistake of mine.
Many many thanks for your help :wink: