Get the most out of your Centmin Mod LEMP stack
Become a Member

Issue copying Xenforo attachments using s3cmd to DigitalOcean Spaces

Discussion in 'System Administration' started by brainlet2000, Feb 27, 2021.

  1. brainlet2000

    brainlet2000 Member

    39
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    11:44 PM
    1.17.7
    10.3.21
    The attachments are around 90 GB. I used the same command on the avatars and it worked flawlessly (they're only 5 GB):

    Code:
    s3cmd put * s3://yourfolder --acl-public --recursive
    
    I checked the "commonly found errors" FAQ on their GitHub and it gave me this:

    Code:
     Problem: ParseError: syntax error: line 1, column 0
    Example:
    
    Problem: ParseError: no element found: line 1, column 0
    S3cmd:   1.1.0-beta3
    
    Traceback (most recent call last):
      File "/usr/bin/s3cmd", line 1800, in <module>
        main()
      File "/usr/bin/s3cmd", line 1741, in main
        cmd_func(args)
      File "/usr/bin/s3cmd", line 462, in cmd_object_del
        subcmd_object_del_uri(uri_str)
      File "/usr/bin/s3cmd", line 488, in subcmd_object_del_uri
        response = s3.object_delete(S3Uri(item['object_uri_str']))
      File "/usr/share/s3cmd/S3/S3.py", line 403, in object_delete
        response = self.send_request(request)
      File "/usr/share/s3cmd/S3/S3.py", line 613, in send_request
        e = S3Error(response)
      File "/usr/share/s3cmd/S3/Exceptions.py", line 48, in __init__
        tree = getTreeFromXml(response["data"])
      File "/usr/share/s3cmd/S3/Utils.py", line 69, in getTreeFromXml
        tree = ET.fromstring(xml)
      File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1301, in XML
        return parser.close()
      File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1654, in close
        self._raiseerror(v)
      File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
        raise err
    ParseError: no element found: line 1, column 0
    Solution:
    

    I haven't been here in a while solving most issues successfully myself but I'm totally lost on this one. The only thing I can think of is the fact that I lazily used the DigitalOcean Spaces GUI to move the avatar folder across recursively (which is still ongoing, and takes ages, my mistake should've used CLI) which is interfering with the main attachments transfer.

    Does anyone have any idea? Thanks everyone!
     
    Last edited: Feb 28, 2021
  2. eva2000

    eva2000 Administrator Staff Member

    46,426
    10,551
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,371
    Local Time:
    7:44 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
  3. Rhodium

    Rhodium New Member

    7
    3
    3
    Jul 1, 2020
    Ratings:
    +3
    Local Time:
    11:44 PM
    Try rclone, its faster than s3cmd.
     
  4. brainlet2000

    brainlet2000 Member

    39
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    11:44 PM
    1.17.7
    10.3.21
    I fixed it, I just had to wait for DO to copy the files across through the GUI. Thanks