Code Monkey home page Code Monkey logo

Comments (8)

zertrin avatar zertrin commented on August 16, 2024

Hi,

To begin, the presence or absence of s3cmd does not usually affect the success or failure of backup, as it's only used to show remote used space in the logs. So if you say your backups failed, the root cause is likely yet to be found.

Concerning exiting with 0 code, you should check if it is actually the script that fail somewhere or if it comes from somewhere else (did you manage to perform backup directly with duplicity using the command issued in logs by the script when run in debug mode? ("-n" option))

Finally, it's always hazardous to presume what is "typically" available on a system. Anyway you're welcome if you want to propose a patch to add support for sendmail if you need it :)

Regards

Am 27.10.2012 um 18:37 schrieb "Stefano J. Attardi" [email protected]:

My backups have been failing silently (returning a code 0, which should mean success). My monitoring scripts have failed to alert me (because of the code 0), and I didn't get any email (probably because I don't have mailx, mail, or ssmtp). In the logs it says "Current Remote Backup File Size: s3cmd not installed.". I have s3cmd installed, so that's not the issue.

I see three issues here:

Backups should never fail with a code 0.
The "s3cmd not installed" message is wrong, or at least not very helpful in debugging the real issue.
The default mail command setting should be something that is typically installed by default (e.g. sendmail).

Reply to this email directly or view it on GitHub.

from duplicity-backup.sh.

steadicat avatar steadicat commented on August 16, 2024

Hi,

Thanks for your help. Point taken about sendmail.

It's still curious however that I'm getting code 0, with nothing useful in the logs, yet there is no backup (as verified by ./duplicity-backup.sh -s). I can verify that the script runs because a new log file is created, with this content:

--------    START DUPLICITY-BACKUP SCRIPT    --------

Attempting to acquire lock /var/log/duplicity/backup.lock
successfully acquired lock.
--------    END    --------

--------    END DUPLICITY-BACKUP SCRIPT    --------

Removing lock. Exit code: 0

For what it's worth, the backup succeeds when I initiate it manually. It's failing when started from cron (as root). Any ideas?

from duplicity-backup.sh.

zertrin avatar zertrin commented on August 16, 2024

Sorry for late response, crazy busy week beginning...

Could you give more information on the environment (shell, Linux distro, permissions, who is launching the script).

What does which s3cmd give as output when launched from root and then from the user that launch the script usually.

What is the command issued in the log when setting the ECHO setting (or giving -n as parameter) ? (with any personal information removed of course).

May you paste your actual configuration file (with all personal infos/credentials removed) to some pastebin of your choice?

Without these informations, there's little I can do to help you ;)

from duplicity-backup.sh.

steadicat avatar steadicat commented on August 16, 2024

I really appreciate your help. However, I don't want to waste your time debugging my specific setup. I think it would be more helpful to other people using this project if we instead focused on making it easier for people like me to figure out what's going wrong on their own.

Right now the script is running, printing nothing useful in the logs, and exiting with code 0. Yet the backup does not exist. IMO, that should never happen. Especially for something so critical as a backup script.

If I set the ECHO setting, I get this when I test the script: "TEST RUN ONLY: Check the logfile for command output.". Which doesn't sound like what I want. I want the backup script to run as normal but print more verbose logging. Does that make sense? Is there a way for me to do that?

from duplicity-backup.sh.

zertrin avatar zertrin commented on August 16, 2024

If I set the ECHO setting, I get this when I test the script: "TEST RUN ONLY: Check the logfile for command output.". Which doesn't sound like what I want. I want the backup script to run as normal but print more verbose logging. Does that make sense? Is there a way for me to do that?

Did you look in the logfile to see which command was printed?

About the way for you to do what you think would be useful for you, I can only suggest you to contribute by patching the script to achieve your will.

Fact is on my side that the script works like a charm and my log files are full of content... Unless we can understand why that isn't the case for you, I won't be able to do much more: can't fix something that doesn't seem broken to me...

from duplicity-backup.sh.

zertrin avatar zertrin commented on August 16, 2024

Do you still have this problem?
As said, without more information I don't know where to look to fix something...
I just tried again a few times using Amazon S3 backend with s3cmd installed, and everything is working fine for me...

EDIT: here is my logfile full of contents for example: http://zerobin.zertrin.org/?537644c62b080321#VYtZZqUFg5FaX1gpaLAADzyj0iApOaAu6Qp57xghXD8=

from duplicity-backup.sh.

zertrin avatar zertrin commented on August 16, 2024

Hi @steadicat ,

If you don't have the problem anymore or don't answer here until next week, I'll close the issue.

If you still have the problem, please give the aforementioned information to help me find the cause of your problem.

Another suggestion, run the script giving the path to your actual config file explicitly ./duplicity-backup.sh -c /path/to/your/config/file -s

from duplicity-backup.sh.

zertrin avatar zertrin commented on August 16, 2024

As said before, I close this issue as there's nothing I can do if I don't have more information...

Feel free to reopen it if needed.

from duplicity-backup.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.