# Restoring from command line fails with errors

**URL:** <https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341>\
**Category:** File Services\
**Created:** [22 May 2020 04:31 UTC](https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341 "2020-05-22T04:31:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ubeaut](https://community.ipfire.org/user_avatar/community.ipfire.org/ubeaut/32/2255_2.png) [@ubeaut](https://community.ipfire.org/u/ubeaut)\
**Post date:** [22 May 2020 04:31 UTC](https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341/1 "2020-05-22T04:31:44Z")

</div>

Hi,  
I have ipfire core update 144 64 bit running and I automatically generate backups every night and keep 7 copies on hand.

I use this command:  
/usr/local/bin/backupctrl exclude

It works well and I rsync the backups to another server. That works well.

What doesn’t work is when I restore the files.  
I run this command after I copy the file ipf file I want to restore to /tmp and call it restore.ipf  
backupctrl restore

It runs then come back with:  
/var/ipfire/backup/bin/backup.pl: line 135: firewallctrl: command not found  
/var/ipfire/backup/bin/backup.pl: line 138: convert-ovpn: command not found  
/var/ipfire/backup/bin/backup.pl: line 150: convert-dns-settings: command not found

The above files are in /usr/local/bin/ e.g firewallctrl

I am running the command as root and the path is: /usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

I would assume these commands would run but they don’t.

If I edit /var/ipfire/backup/bin/backup.pl and add the whole path to the command then it works.

For example I change this:  
firewallctrl  
to this:  
/usr/local/bin/firewallctrl

Is this a bug? It used to work as far as I can remember.

I have edited the /var/ipfire/backup/bin/backup.pl file as a work around but I am sure this might get overwritten next update.

Anyone else have this issue?

The system I am using is not a fresh install and has been upgraded several times.

Thanks

---

<div class="post-metadata">

**Author:** ![martinwunderli](https://community.ipfire.org/user_avatar/community.ipfire.org/martinwunderli/32/238_2.png) [@martinwunderli](https://community.ipfire.org/u/martinwunderli)\
**Post date:** [3 July 2020 13:20 UTC](https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341/2 "2020-07-03T13:20:23Z")

</div>

Same with me. I used the workaround “create symlinks to /bin”, but I feel a bit uncomfortable since I do not (yet) understand the reason. Must be something with the path handling…

Cheers  
Martin

---

<div class="post-metadata">

**Author:** ![ubeaut](https://community.ipfire.org/user_avatar/community.ipfire.org/ubeaut/32/2255_2.png) [@ubeaut](https://community.ipfire.org/u/ubeaut)\
**Post date:** [3 July 2020 23:19 UTC](https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341/3 "2020-07-03T23:19:52Z")

</div>

Maybe it should be in bugzilla?

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [12 March 2022 22:31 UTC](https://community.ipfire.org/t/restoring-from-command-line-fails-with-errors/2341/4 "2022-03-12T22:31:32Z")

</div>


