Delete nested directory (without S3 gateway)

After i found a way to upload whole directory structure to tardigrade with

find . -type f -exec /home/juerg/uplink_linux_amd64 cp ‘{}’ sj://backup-home-test/nested/’{}’ ;

Now i m looking for the other thing called “delete” the whole directory structure again.

…sometimes i feel very lonely here. Am i the only one asking such questions? Is there any colection with some scripts or something else?

Umm … “uplink rm”?

Is anybody working on a FUSE user-space mount? That’d make all of this a whole lot easier to use.

I tried a little with Dokany to make a virtual file system for windows. If anyone is interested, I could try to make it public on github and we could work on it together. I did not yet find the time to finish it and it was really very, very basic (currently ready-only and not working with deeper subdirs…).

@smurfix Did you read my post? Do you did it once?

Last time this was asked the response was that it isn’t yet supported. You’d have to code around it.

Btw, you may get better responses when posting this in the correct category. You posted in Storage Node Operators, but this should be in Engineering Discussions sub category UPLINK / TARDIGRADE. I moved it for you. Maybe it catches the eye of the right people here.

1 Like

Please, try this one:

uplink ls sj://test/nested | awk '{print "uplink rm sj://test/nested/" $5}' | bash

Better this one in case if your object name has spaces:

uplink ls sj://test/nested --recursive | sed 's@.* [0-9]* @uplink rm "sj://test/nested/@g; s/$/"/g' | bash

There is only one more problem here. I cant delete the first nested directory like:

$ /home/juerg/uplink_linux_amd64 rb sj://backup-home-test/nested
Error: nested buckets not supported, use format sj://bucket/

$ /home/juerg/uplink_linux_amd64 ls sj://backup-home-test/nested
is empty

How to remove it?

$ /home/juerg/uplink_linux_amd64 rm sj://backup-home-test/nested

But your nested path should be empty

Nestet path is empty:
juerg@home-server:~ /home/juerg/uplink_linux_amd64 ls sj://backup-home-test/nested juerg@home-server:~

rm is for files delete and gives me also:

juerg@home-server:~$ /home/juerg/uplink_linux_amd64 rm sj://backup-home-test/nested
Error: object not found: sj://backup-home-test/nested

The nested path usually get deleted with the last file.

uplink ls sj://backup-home-test/
1 Like

resurrecting an old thread… this would be great:

uplink rm -r sj://bucket/path

where path is actually something like: /path/to/some/files

this is what I see:

  • list of files to get started

    (base) ~ $ uplink ls sj://duplicatibackups/myfiles/
    OBJ 2020-09-22 21:28:07 10181 myfiles/conda.packages

  • try to remove a folder that’s not empty

    (base) ~ $ uplink rm sj://duplicatibackups/myfiles
    Deleted sj://duplicatibackups/myfiles

  • but the file is still there. the remove message above is misleading

    (base) ~ $ uplink ls sj://duplicatibackups/myfiles/
    OBJ 2020-09-22 21:28:07 10181 myfiles/conda.packages

  • wild cards also don’t work

    (base) ~ uplink rm sj://duplicatibackups/myfiles/* Deleted sj://duplicatibackups/myfiles/* (base) ~ uplink ls sj://duplicatibackups/myfiles/
    OBJ 2020-09-22 21:28:07 10181 myfiles/conda.packages

  • explicit delete works great

You can use this command

uplink ls --recursive sj://duplicatibackups/myfiles/ | sed -E 's/(.* ){4}//g' | xargs -P64 -Ifullname uplink rm "sj://duplicatibackups/fullname"

Correct the highlighted errors and try again.

A post was split to a new topic: Easier way to delete