Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9020637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:04:15+00:00 2026-06-16T05:04:15+00:00

I am trying to implement an automatic backup system for my EBS on Amazon

  • 0

I am trying to implement an automatic backup system for my EBS on Amazon AWS.

When I run this command as ec2-user:

/opt/aws/bin/ec2-create-snapshot --region us-east-1 -K /home/ec2-user/pk.pem -C /home/ec2-user/cert.pem -d "vol-******** snapshot" vol-********

everything works fine.

But if I add this line into /etc/crontab and restart the crond service:

15 12 * * * ec2-user /opt/aws/bin/ec2-create-snapshot --region us-east-1 -K /home/ec2-user/pk.pem -C /home/ec2-user/cert.pem -d "vol-******** snapshot" vol-********

that doesn’t work.

I checked var/log/cron and there is this line, therefore the command gets executed:

Dec 13 12:15:01 ip-10-204-111-94 CROND[4201]: (ec2-user) CMD (/opt/aws/bin/ec2-create-snapshot --region us-east-1 -K /home/ec2-user/pk.pem -C /home/ec2-user/cert.pem -d "vol-******** snapshot" vol-******** )

Can you please help me to troubleshoot the problem?

I guess is some environment problem – maybe the lack of some variable. If that’s the case I don’t know what to do about it.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:04:17+00:00Added an answer on June 16, 2026 at 5:04 am

    For starters crontab does not have $PATH and you will also have to have EC2_HOME and JAVA_HOME exported.
    I suggest that you make a script that has the two exports on the top and then you call the create snapshot.
    So a simple

    export EC2_HOME=your_ec2_home
    export JAVA_HOME=your_java_home
    /opt/aws/bin/ec2-create-snapshot --region us-east-1 -K /home/ec2-user/pk.pem -C /home/ec2-user/cert.pem -d "vol-******** snapshot" vol-********
    

    As a rule of thumb it is generally a good practice to have your backup procedure in a script.
    You can find a sample script in the following link:
    https://forums.aws.amazon.com/message.jspa?messageID=350163.
    There are a number of scripts available that are customizable and have most of ec2 functionality automated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to develop a system where this application allows user to book
I am trying to implement a very simple automatic deployment system for my team.
Trying to implement a search similar to here .This searches properties based on city,locality,property
Trying to implement a rating system of users and postings. What is the best
I'm trying to implement automatic registration of my listeners to a singleton event aggregator
I am trying to manually implement a login system in ASP.NET 3.5. Basically, on
I'm trying to implement some automatic logout code for my Application on Android. I
I'm trying to implement an automatic timeout inside of an existing PHP application. My
i m trying to implement this thing , that when ever a person opens
I'm trying to implement a continuous deployment system and I seem to not be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.