in debian

Expanding Development Capabilities: Proton Drive and Debian GNU/Linux

Chapter 3: My Personal Journey as an Aspiring Debian Maintainer

Expanding Development Capabilities: Hybrid Setup with Proton Drive and Debian GNU/Linux

8 November, 2025

The Space Limitations of a 13 year old laptop

As a developer with more than 20 years of experience in Unix/Linux, I have faced a constant challenge: local storage limitations versus the need to keep multiple projects active, especially when I work on complex packaging such as Chromium Embedded Framework (CEF) for Debian. Recently, I developed an elegant solution that combines Proton Drive with Linux automation to create a truly hybrid development ecosystem.

The Problem: Legacy Hardware Limitations

My main setup includes a MacBook Pro 11,1 running Debian, with barely 100GB of SSD storage. With only 15GB free after installing the essential development tools, every packaging project becomes a game of disk space tetris. CEF builds can generate several gigabytes of data, and keeping multiple iterations for debugging becomes impossible.

Besides, I work from multiple machines – the main one at home and a travel laptop – which requires constant manual synchronisation of configuration files, technical documentation and development progress.

The Solution: Hybrid Architecture with Proton Drive

System Components

1. Local Storage (SSD 100GB)

  • Active work and builds in progress
  • Maximum speed for compiling
  • Temporary system cache

2. Proton Drive (500GB)

  • End-to-end encrypted expanded storage
  • Automatic backup of work
  • Synchronisation between machines
  • Archive of completed builds

3. External Storage (SanDisk + CalDigit)

  • Massive storage for historical builds
  • Repositories of large packages
  • Backup of complete systems

Directory Architecture

# Estructura local
~/development/debian/           # Trabajo activo (local SSD)
~/ProtonDrive/                  # Mount automático (Proton Drive)
├── cef-builds-archive/         # Builds completados
├── documentation-backup/       # Docs técnicas
├── config-backup/             # Configuraciones del sistema
└── temp-builds/               # Storage temporal expandido

# Estructura en Proton Drive
protondrive:/sync/debian/       # Sync automático trabajo activo
protondrive:/mount/             # Storage expandido montado

Technical Implementation

1. RClone Configuration

RClone acts as the bridge between the local system and Proton Drive, providing both synchronisation and filesystem mounting capabilities.

# Instalación desde repositorios Debian
sudo apt update
sudo apt install rclone

# Verificar instalación
rclone --version

# Configuración
rclone config
# Seleccionar: protondrive
# Introducir credenciales de Proton Mail
# Configurar 2FA si está habilitado

2. Automatic Synchronisation Service

I created a systemd service that automatically synchronises the active work every 4 hours:

# ~/.config/systemd/user/proton-sync.service
[Unit]
Description=Sync Debian work to Proton Drive

[Service]
Type=oneshot
ExecStart=/usr/bin/rclone sync -L %h/development/debian protondrive:/sync/debian \
    --exclude="*.tmp" \
    --exclude="*.lock" \
    --exclude=".git/**" \
    --exclude="build/**" \
    --exclude="*.log" \
    --ignore-existing \
    --transfers=2 \
    --checkers=1 \
    --timeout=300s \
    --retries=3 \
    -q

# ~/.config/systemd/user/proton-sync.timer
[Unit]
Description=Sync Debian work every 4 hours

[Timer]
OnCalendar=*-*-* 00,04,08,12,16,20:00:00
Persistent=true

[Install]
WantedBy=timers.target

Activation:

systemctl --user daemon-reload
systemctl --user enable --now proton-sync.timer

3. Automatic Mount of Expanded Storage

For cases where I need direct access to storage as if it were a local filesystem:

# ~/.config/systemd/user/proton-mount.service
[Unit]
Description=Mount Proton Drive storage
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
Environment=PATH=/usr/bin:/bin
ExecStartPre=/bin/mkdir -p %h/ProtonDrive
ExecStartPre=/bin/sh -c 'fusermount -u %h/ProtonDrive || true'
ExecStart=/usr/bin/rclone mount protondrive:/mount %h/ProtonDrive \
    --vfs-cache-mode full \
    --vfs-cache-max-size 20G \
    --vfs-cache-max-age 24h \
    --buffer-size 32M \
    --dir-cache-time 1h \
    --allow-other
ExecStop=/bin/fusermount -u %h/ProtonDrive
Restart=on-failure
RestartSec=15

[Install]
WantedBy=default.target

Required previous configuration:

# Habilitar user_allow_other en fuse
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf

# Habilitar linger para arranque automático
sudo loginctl enable-linger $USER

4. Workflow Scripts

Pull script (start of a work session):

#!/bin/bash
# start-work.sh
echo "Descargando últimos cambios..."
rclone sync protondrive:/sync/debian $HOME/development/debian --progress -v
echo "Listo para trabajar"

Push script (end of a work session):

#!/bin/bash
# end-work.sh
echo "Subiendo cambios..."
rclone sync -L $HOME/development/debian protondrive:/sync/debian \
    --exclude="*.tmp" \
    --exclude="*.lock" \
    --exclude=".git/**" \
    --exclude="build/**" \
    --exclude="*.log" \
    --ignore-existing \
    --transfers=2 \
    --checkers=1 \
    --timeout=300s \
    --retries=3 \
    --stats=30s \
    --progress \
    -v
echo "Trabajo guardado"

Archive script for CEF builds:

#!/bin/bash
# archive-cef-build.sh
BUILD_DATE=$(date +%Y%m%d_%H%M%S)
echo "Archivando build CEF actual..."
cp -r ~/development/debian/chromium-embedded-framework/build \
    ~/ProtonDrive/cef-builds-archive/cef-build-$BUILD_DATE
echo "Build archivado en ~/ProtonDrive/cef-builds-archive/cef-build-$BUILD_DATE"

System Advantages

1. Transparent Scalability

The laptop with 15GB free can now handle multi-gigabyte projects with no impact on local performance. Active builds stay on SSD for maximum speed, while the automatic archive frees up space continuously.

2. Continuity Between Machines

The pull/push workflow makes it possible to switch between the main machine and the travel laptop without losing context. Each session starts with start-work.sh and ends with end-work.sh, guaranteeing perfect synchronisation.

3. Automatic Encrypted Backup

With a timer every 4 hours, I never lose more than 4 hours of work. The end-to-end encryption of Proton means that even sensitive client data is protected.

4. Storage Flexibility

  • Local: Maximum speed for active work
  • Mount: Direct access as a filesystem for special cases
  • Sync: Automatic backup with no manual intervention
  • External: Massive capacity for long term archive

Specific Use Cases

CEF Development (Chromium Embedded Framework)

CEF builds generate several GB of artifacts. The configuration allows:

  • Active build on local SSD (speed)
  • Automatic archive of completed builds
  • Synchronisation of technical documentation between iterations
  • Backup of build scripts and custom patches

Remote Work and Travel

Before the system, working from the travel laptop meant:

  • Manual synchronisation prone to errors
  • Loss of context between machines
  • Even more severe storage limitations

Now it is completely transparent: start-work.sh on any machine restores the exact context of the last session.

Monitoring and Maintenance

Service Verification

# Ver estado de servicios
systemctl --user status proton-sync.service
systemctl --user status proton-mount.service

# Ver próximas ejecuciones del timer
systemctl --user list-timers proton-sync.timer

# Logs detallados
journalctl --user -u proton-sync.service --since today

Diagnostic Scripts

#!/bin/bash
# check-proton-setup.sh
echo "=== Estado del Sistema Proton Drive ==="

# Verificar mount
if mountpoint -q ~/ProtonDrive; then
    echo "✅ Storage expandido montado correctamente"
    df -h ~/ProtonDrive
else
    echo "❌ Mount no disponible"
fi

# Verificar timer de sync
if systemctl --user is-active proton-sync.timer >/dev/null; then
    echo "✅ Timer de sync activo"
    systemctl --user list-timers proton-sync.timer
else
    echo "❌ Timer no activo"
fi

# Verificar conectividad
if rclone ls protondrive:/sync/ >/dev/null 2>&1; then
    echo "✅ Conectividad con Proton Drive OK"
else
    echo "❌ Problema de conectividad"
fi

Performance Considerations

Network and Latency

  • Upload: ~30-80 Mbps after encryption overhead
  • Download: Near line speed with the local cache active
  • Latency: Imperceptible for access to cached files

Implemented Optimisations

  • VFS cache full: 20GB local cache for fast access
  • Limited transfers: 2 concurrent transfers for stability
  • Smart exclusions: Temporary files and logs excluded from the sync
  • Ignore existing: Avoids conflicts in bidirectional synchronisation

Impact on Productivity

Improvement Metrics

  • Effective storage: From 15GB to 515GB available
  • Setup time between machines: From 30+ minutes to <2 minutes
  • Maximum work loss: From potential days to a maximum of 4 hours
  • Project flexibility: Multiple simultaneous CEF builds possible

Recovery Cases

During development, I experienced an unexpected disconnection that would have resulted in a significant loss of work. The automatic system had synchronised the progress 2 hours earlier, allowing complete recovery in minutes.

Lessons Learned

1. Automation vs Control

The balance between the automatic timer (every 4h) and the manual scripts (pull/push) provides both continuous protection and granular control when it is needed.

2. Exclusions are Critical

The initial configuration included build logs (35MB each), saturating the network. The smart exclusions improved performance dramatically.

3. Systemd User Services

User services provide robust automation without requiring root privileges, ideal for personal development environments.

Conclusion

This hybrid configuration solves multiple limitations at the same time: storage space, continuity between machines, automatic backup and project scalability. For developers working on complex projects such as Debian packaging or extensive software builds, it represents an elegant solution that combines the best of fast local storage with the flexibility and security of encrypted cloud storage.

Key Advantages of the System

  • Zero downtime from loss of work
  • Transparent scalability of storage
  • Perfect continuity between multiple machines
  • Automatic encrypted backup with no manual intervention
  • Storage flexibility adapted to different needs

Next Steps

This setup forms the base for future expansions:

  • Integration with CI/CD for automatic builds
  • Advanced monitoring with usage metrics
  • Selective synchronisation by project
  • Automatic archive based on time policies

For developers facing similar legacy hardware limitations but needing to stay productive on complex modern projects, this hybrid architecture provides a practical and scalable solution.

The complete configuration code and scripts are available in my dotfiles repository, and I will continue documenting improvements and optimisations as the system evolves.


Technical References

Comment on Mastodon

Tags

  • #almacenamiento
  • #automation
  • #automatizacion
  • #debian
  • #development-workflow
  • #flujo-de-trabajo
  • #gnu
  • #linux
  • #proton-drive
  • #rclone
  • #storage
  • #systemd