Overblog Tous les blogs Top blogs Entreprises & Marques Tous les blogs Entreprises & Marques
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU
http://aupygr.over-blog.com/

aupygr.over-blog.com/

Publicité

Crypt Sync Files 1 3 1



Easily encrypt files and folders with Microsoft EFS (Encrypted Files System) using Windows 8.1, Windows 8, Windows 7 and XP. FineCrypt 9.1 is available to all software users as a free download for Windows 10 PCs but also without a hitch on Windows 7 and Windows 8. Since the publisher or product no longer exists, the download of FineCrypt is from the archive and therefore outdated; updates to this software should not be expected.

  1. Set a setuptools lower bound for PEP517 wheel building. We no longer distribute 32-bit manylinux1 wheels. Continuing to produce them was a maintenance burden.
  2. Without the password your files are lost. Do not forget your password! Always keep proper backups of important files, encrypted or not. This is the only official download site for AxCrypt. Lookup SHA256 hash. Keep in mind that if you install AxCrypt 2 and open old files, these files will no longer be possible to open with AxCrypt 1.

There are many use cases for rclone. Mine was to 'sync' with my 'free' 15 GB Google Drive on Linux. While most of my files aren't particularly sensitive, there are a number that are. Until recently, I encrypted these manually using 7-zip. The problem with that was having to decrypt manually every time I wanted to look at them.

The Problem

Rclone has an encryption overlay that can be used to encrypt either a single folder or all folders in a configured remote (a networked storage system like Google Drive, OneDrive, AWS S3 or GCS). Setting it up is pretty easy, but an unintended consequence not discussed in any of the many tutorials on rclone encryption is that if your encrypted folder is a folder on an already existing remote (which is my preferred setup), using sync on the whole remote will remove the unencrypted files in the local copy of the folder and replace them with encrypted files.

The Solution

Istatistica 3 0 3. The solution to this conundrum isn't hard: use the '--filter' option to exclude the folder you're using to store encrypted files.

An example is worth a thousand words.

Assume a remote named 'gdrive' configured to work with Google Drive (using rclone's 'drive' connector, see https://rclone.org/drive/). Also assume a crypt type remote named 'gdrive-crypt' configured to encrypt files in 'gdrive:/Private' (see https://rclone.org/crypt/).

To sync gdrive to a local folder called 'GDrive', you'd issue this command:

Now say you have some files in ~/GDrive/Private that you'd like encrypted up on Google Drive:

So far, so good. But what if you sync down from Google Drive to the ~/GDrive folder again?

All the files previously readable in ~/GDrive/Private are now in their encrypted, undreadable, form!

I can restore the readable versions by running the following:

But that's a bit of work. Why not just to this to begin with:

Or something a little less cumbersome: put that pattern in a file, say ~/etc/gdrive-filter.conf, that looks like this:

Once that's done, you can run this command:

What makes this even better is that the filter option will also work in the other direction:

Scripts

WARNING: Before doing anything, be sure to back up your existing local GDrive folder:

I have written a couple of scripts and a filter file to make all this a bit easier:

gdrive-down
gdrive-up
gdrive-filter.conf

Notes

  1. My current workflow changed since first writing this. I've returned to using Insync v3 Desktop on my personal workstation. Although I sometimes still use an rclone script on Linux to manually sync with Google Drive, encrypting the Private folder's contents became inconvienent. Therefore, my modified scripts now look like this:

gdrive-down

gdrive-up

  1. It's best to start out with a clean (as in empty) local directory. Over time, I've had rclone choke when trying to sync certain files for no apparent reason. All sync programs do this, which is why it's always important to make sure you've got redundant backups.

  2. Part of my rclone workflow used to include a cron job on the home server that ran the gdrive-down script early every morning. Those files then got backed up to AWS S3 later on for redundancy. I now use the free Insync headless/server v1 for that (Insync has released v3 of their paid headless/server product, but I'm still waiting for it to stabilize before subscribing).

  3. This works with the Windows port of rclone as well, although I haven't established a workflow (scripts, config file) for it yet.

  4. As far as local storage is concerned, my personal Ubuntu laptop's SSD disk is encrypted and password protected by LUKS.

  5. Since signing up for Google Fiber I now have 1 TB free on Google Drive, a scary amount of storage for personal use. Had I thought it through, I would have subscribed using a separate shared/collective 'family' account so that it could be used for backups (thus obsoleting my AWS S3 project). But really, Google should have thought of that and suggested it (is that reflective of Google's 'me generation' management?).

GitHub

eix is a set of utilities for searching and diffing local ebuild repositories using a binary cache.

It is made to be more efficient and flexible than the emerge --search command. eix comes with colorized output which helps users easily find the needed package information.

  • 1Installation
  • 2Configuration
    • 2.3Managing the cache
      • 2.3.2Updating the cache with each sync
  • 3Usage
    • 3.1Searching for packages
    • 3.2Format strings
  • 4Tips

Installation

Emerge

Install app-portage/eix:

Configuration

Files
  • /etc/eix-sync.conf - Stores commands and configurations for eix-sync
  • /etc/eixrc - eix's global configuration file.
  • ~/.eixrc - eix's per-user configuration file.
Environment variables
  • EIXRC - If this variable can set a new location for eix's global configuration file (see above).
  • EIX_SYNC_OPTS, EIX_SYNC_CONF, EIX_REMOTE_OPTS, EIX_LAYMAN_OPTS, EIX_TEST_OBSOLETE_OPTS - Security relevant variables. See the man page for more details.
Managing the cache
Updating the cache manually

After the installation has finished, it is important to update the cache to index all packages on the system. Running following command will update the local eix cache:

Updating the cache with each sync

After each update of the Portage tree the cache needs to be updated. Additionally, one may want to see a diff of the changes since the last sync:

root #cp -a /var/cache/eix/portage.eix /var/cache/eix/previous.eix
root #eix-diff

The following 2 methods are used to automatically update the cache with each sync.

Sync
Note
Method 1 is preferred, as it is able to work in combination with all possible emaint sync commands (see Portage plug-in sync system specification).
Method 1: Using Portage's postsync hook

After each sync all executable scripts in the directory /etc/portage/repo.postsync.d/ are called:

Do not forget to make the file executable:

If additional ebuild repositories are used, eix-update can become quite slow, as many of them do not provide pregenerated caches. To speed up the process of eix-update, one can hook portage to regenerate the cache for each repository after each sync. An example for this is given in the file /etc/portage/repo.postsync.d/example. We can copy this example to /etc/portage/repo.postsync.d/egencache and make it executable. Note the --jobs arg to egencache - setting this to the output of nproc (as shown below) causes it to use all available cpus. If less impact is desired, of course this can be set differently.

FILE/etc/portage/repo.postsync.d/egencache
Method 2: Using eix-sync

Alternatively, one can use eix-sync tool from eix itself:

The above command is a shorthand way to running these commands sequentially:

root #cp -a /var/cache/eix/portage.eix /var/cache/eix/previous.eix
root #eix-diff

If ebuild repositories are used, it is recommended to configure eix to synchronize them too:

To speed up eix-update in case of large repositories have a look at this page.

Adding remote repositories to the cache

Fetch the caches of some layman overlays and store them locally (by default it fetches eix-caches from http://gpo.zugaina.org/eix_cache/eix-cache.tbz2):

To have the above command be run automatically on each eix-sync, a solution is to use a postsync hook:

FILE/etc/portage/repo.postsync.d/eix

Do not forget to make the file executable:

After that you will be able to search all overlays (not only installed ones) using -R option:

Using tmpfs cache

This breaks eix because /var/cache/eix is missing when /var/cache is mounted:

The simple solution is to move the eix cache files away from the default location:

Check all new set variables:

root #eix --dump | grep 'EIX_CACHEFILE|EIX_PREVIOUS|EIX_REMOTE1|EIX_REMOTE2|EIX_REMOTEARCHIVE1|EIX_REMOTEARCHIVE2'

Crypt Sync Files 1 3 1/8

One side effect is needing to run eix-update after each reboot which will take a few seconds.
To do so, add a .start script to the /etc/local.d/ (Local.d) directory:





Publicité
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article