Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync-dir function for Cloud Files #383

Open
filler opened this issue Jan 20, 2016 · 4 comments
Open

Add sync-dir function for Cloud Files #383

filler opened this issue Jan 20, 2016 · 4 comments

Comments

@filler
Copy link

filler commented Jan 20, 2016

Hello --

First off, rack rules. Thanks for that. 😸

It would be helpful if there was a sync-dir function for Cloud Files. Much in the spirit of upload-dir, the idea is rack would only upload files to a named container which dont exist in the container but exist in the source of the sync-dir function. Also objects in the container which are not part of the source directory would be pruned.

There are many times when operators land files in a backup target directory on a source host, perform some life-cycle management (eg prune files older than n days) then want to shunt the remaining source files up to Cloud Files for safe-keeping (examples include db backups, log escrowing, etc).

Currently rack users have to empty a container and then call upload-dir in order to get a lifecycle-managed directory on the source into to the container. Thats rather inefficient for source bandwidth and the Files API.

It would be nice to optionally pass in an --prune option at sync-dir runtime to let the operator choose whether to remove files in the container which are not part of the source directory. Sometimes operators want to keep all the things in Files, other times operators do not and simply want a 1:1 relationship between files in the source directory and the container.

Duplicity is a tool which lots of operators use in order to incrementally sync directories into Cloud Files. Its an operational pain whereas rack isnt. 😄

rclone has sync behavior like this by default. Given a fileset both on local disk and in a container, removing some of the files in the set on local disk and calling rclone sync removes them from the container they were previously synced in. It looks like it doesnt offer the operator the option to just shunt new local files on disk to the container and keeping the files in the container which were not on disk.

@jrperritt
Copy link
Contributor

Thank you for filing this; it's something that was on my to-do list and got pushed back. I think I'll be able to work on it next week.

@filler
Copy link
Author

filler commented Feb 3, 2016

That would be so 🔥. Thanks @jrperritt!

@jrperritt jrperritt added this to the 1.3 milestone May 4, 2016
@jrperritt jrperritt added the files label May 4, 2016
@mbejda
Copy link

mbejda commented Jun 18, 2017

Any update on this ?

@jrperritt
Copy link
Contributor

Currently there are no plans to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants