1

I'm setting up a backup of my vital data (database and images, mainly) to S3 from my Ubuntu box. I've set up Amazon S3, and installed S3FS to mount the bucket on my machine. This is working well, but when I test my script, I'm getting a warning:

s3fs: MOUNTPOINT directory /aaa/bbb/ccc/ is not empty.
s3fs: if you are sure this is safe, can use the 'nonempty' mount option.

So, I'm not sure of the theory of how the mounted drive should work. I was thinking that I could mount the drive just before I put a new file into the directory to back up, and then unmount the drive when I'm done. Is this flawed logic? Should I just mount the drives once and leave them? If the mount fails for some reason and I need to re-mount, should I be emptying the directory before re-mounting?

For additional information, I'll be overriding database backups on a rotational basis, and rsyncing a large directory of images.

Any help with the theory or ideas for how I can set this up effectively and by using best practice much appreciated!

Edit: Or would s3cmd be better suited to my backup plans?

8
  • -1 So is the /aaa/bbb/ccc mount point directory empty at that point in time when your script is executing? Put something like ls -a /aaa/bbb/ccc just before the mount.
    – user
    Sep 6, 2013 at 9:41
  • Downvoter - why and suggested improvements please. Just a downvote doesn't help anyone
    – dKen
    Sep 6, 2013 at 9:44
  • @MichaelKjörling When I first set it up, it's empty, but as I add files to it, it has contents every subsequent mount. I just had a thought - when I unmount, that directory shouldn't exist any more?
    – dKen
    Sep 6, 2013 at 9:46
  • You have a specific error message and show no effort in fixing it. That falls under "this question does not show any research effort" IMO. Show us what you have tried to correct the error and I'll probably be happy to retract my downvote (and might even change it into an upvote).
    – user
    Sep 6, 2013 at 9:46
  • Mount point directories exist on both sides of the file system barrier. On the unmounted side, normally you want the mount point directory to be empty (that's what s3fs is warning about; the directory is not empty, and it's saying you probably don't want to do the mount there and then, telling you how to override the error if you really want to). When mounted, it shows whatever is on the file system in question. When unmounted, it goes back to whatever is in that directory on the file system that holds the mount point directory. This is basic *nix file system management, and not s3fs specific.
    – user
    Sep 6, 2013 at 9:50

0

You must log in to answer this question.

Browse other questions tagged .