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 8950589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:29:01+00:00 2026-06-15T13:29:01+00:00

I’m trying to use the php sdk with Glacier to upload database backups, I

  • 0

I’m trying to use the php sdk with Glacier to upload database backups, I was able to create and delete vaults using the following code.

<?php
require 'aws.phar';

use Aws\Glacier\GlacierClient;
use Aws\Common\Enum\Region;

$aws = GlacierClient::factory(array(
    'key'    => 'key',
    'secret' => 'secret',
    'region' => Region::US_WEST_2
));
$aws->createVault(array('vaultName'=>'newvault'));

I saw the function uploadArchive(), initiateMultiPartUpload() and uploadMultipartPart().
As I understand I have to intialize the upload and then start to upload the file but I’m not sure which are the parameters the function takes.

I know the methods because they are mentioned here https://github.com/aws/aws-sdk-php/blob/master/src/Aws/Glacier/GlacierClient.php, the parameters is an array of arguments I can’t find what each method needs to properly works and the documentation about glacier and php sdk practically doesn’t exists.

Does anyone make this work? or found good documentation?

  • 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-15T13:29:02+00:00Added an answer on June 15, 2026 at 1:29 pm

    There are published API docs available for SDK 2. The API docs for the GlacierClient lists the parameters for each operation if you click on the little hash symbols on the right.

    EDIT: A recent post on the AWS PHP Development Blog shows how to upload archives to Amazon Glacier using both the single and multipart upload options.

    There is also the Amazon Glacier Developer Guide that is published by AWS. It’s not specific to PHP, but it does talk more about how to use the service and what the parameters mean.

    Though not documented in the API docs, the PHP SDK does some work in the background to help you with uploads for Glacier. In most cases the accountId parameter should be set to "-", so the SDK will default to this if you don’t set one. Also, the SDK calculates the SHA hashes for you if not provided.

    So, simple UploadArchive example (building off what was provided in the question) could be:

    <?php
    
    require 'vendor/autoload.php'; // Include Composer autoloader
    
    use Aws\Glacier\GlacierClient;
    use Aws\Common\Enum\Region;
    
    $glacier = GlacierClient::factory(array(
        'key'    => 'key',
        'secret' => 'secret',
        'region' => Region::US_WEST_2
    ));
    
    $glacier->createVault(array('vaultName' => 'new-vault'));
    
    $result = $glacier->uploadArchive(array(
        'vaultName'          => 'new-vault',
        'archiveDescription' => 'This is my new archive',
        'body'               => 'the contents of the archive',
    ));
    
    $archiveId = $result->get('archiveId');
    

    There is still a lack of examples available, but I’d expect that to improve over time. Also, the AWS SDK for PHP forum is a good place to post questions specifically about the SDK since the SDK team is constantly monitoring the posts there.

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am using Paperclip to handle profile photo uploads in my app. They upload
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.