jotta / jotta-cli-issues

45 stars 1 forks source link

Add ability .jottaignore for sync #154

Closed JMarkin closed 2 years ago

JMarkin commented 2 years ago

Make sure you are running the latest version of jotta-cli before reporting an issue.

jotta-cli release (jotta-cli version):

jottad executable : /usr/local/Cellar/jotta-cli-unstable/0.11.44592/bin/jottad jottad appdata : /Users/user/.jottad jottad logfile : /Users/user/.jottad/jottabackup.log jottad version : 0.11.44592 jotta-cli version : 0.11.44592

Description of problem: I create .jottaignore with content *.log and start sync. Created test.log file and it upload to sync folder Please add .jottaignore ability for sync

Expected: Files in .jottaignore don't watch and sync

jotta-cli status (jotta-cli status):

 Sync      :
------------------------------------------------------------------------------
   Path      : /Users/user/Jottacloud
   Files     : 4 (11.59KiB)
   Mode      : listening to events
   Status    : Up to date - Thu Jul 22 00:35:16
------------------------------------------------------------------------------

Relevant logs for the issue (~/.jottad/jottabackup.log or /var/lib/jotta/jottabackup.log )

2021-07-22 00:34:04.734 +0300 MSK :: Upload /.jottaignore
2021-07-22 00:34:04.866 +0300 MSK :: Upload /.gitignore
2021-07-22 00:34:05.381 +0300 MSK :: Upload /.jottacloudsyncstate
2021-07-22 00:34:05.525 +0300 MSK :: Finished
2021-07-22 00:35:16.151 +0300 MSK :: Upload /test.log
2021-07-22 00:35:16.249 +0300 MSK :: Finished

Traceback

Additional info:

coopersimon commented 2 years ago

Hi JMarkin,

We do plan to have selective sync as a feature in the future. I'll let you know here when we add it.

coopersimon commented 2 years ago

We have added selective sync. Try it out with jotta-cli sync selective set.

Also, sync is now available on stable.

dashart-ke commented 2 years ago

@coopersimon If I read your comments and the v2 documentation, it looks like the ".jottaignore" feature has been dropped with v2? Do I understand the documentation correctly?

This would be a complete showstopper for me. The ".jottaignore" was one of the greatest feature of the jotta-cli status, without it, Jotta would be a "simple" backup service like any other.

coopersimon commented 2 years ago

Hi gdav, we've replaced jotta ignore files with a new system. You can patch over to the new system with jotta-cli ignores patch. See more here: https://docs.jottacloud.com/en/articles/1437235-ignoring-files-and-folders-from-backup-with-jottacloud-cli

If this doesn't fit your needs, I'd be curious to hear why, so please let me know :)

bluet commented 2 years ago

@coopersimon After upgrading jotta-cli version, the current .ignore file stopped working (jotta uploaded everything). In jotta-cli ignores --help, I saw the command jotta-cli ignores use-version-2 and did it, and it fixed nothing. After some checking, I saw the command jotta-cli ignores patch and did it, but it says:

root@jottacloud:/src# jotta-cli ignores patch                        
ERROR  error patching ignores:
[patch /backup/homes ignores: ([) not supported by patterns v2]

Now I'm stuck. What and how should I do to make my lengthy .ignore file work again? Using commands to add/remove ignores rules (and as The Only Way) is not a good idea. We need to EDIT the rules in our favorite editors (ex, vscode).