Skip to main content

Rollback Workflow Preflight

Rollback-ready operations begin with strict preflight checks. If preflight quality is weak, rollback plans become expensive and unreliable.

Preflight Pattern

test -d /srv/site || exit 1
test "$(ls -A /srv/site | wc -l)" -gt 0 || exit 1
rclone lsd remote:site >/dev/null
rclone sync /srv/site remote:site/current --dry-run -vv

Checks to Keep

  • Source exists and is non-empty.
  • Destination remote is reachable.
  • Dry-run output is reviewed and approved.

Examples with Output

1. Example 1

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv 

Expected output:

NOTICE: safety profile applied ()
Would transfer 46 files

2. Example 2

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --delete-after

Expected output:

NOTICE: safety profile applied (--delete-after)
Would transfer 52 files

3. Example 3

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --delete-after --backup-dir remote:site/rollback/$(date +%F-%H%M)

Expected output:

NOTICE: safety profile applied (--delete-after --backup-dir remote:site/rollback/$(date +%F-%H%M))
Would transfer 58 files

4. Example 4

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --checksum

Expected output:

NOTICE: safety profile applied (--checksum)
Would transfer 64 files

5. Example 5

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --size-only

Expected output:

NOTICE: safety profile applied (--size-only)
Would transfer 70 files

6. Example 6

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --check-first

Expected output:

NOTICE: safety profile applied (--check-first)
Would transfer 76 files

7. Example 7

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --exclude "**/*.tmp"

Expected output:

NOTICE: safety profile applied (--exclude "**/*.tmp")
Would transfer 82 files

8. Example 8

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --include "**/*.php"

Expected output:

NOTICE: safety profile applied (--include "**/*.php")
Would transfer 88 files

9. Example 9

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --transfers 4 --checkers 8

Expected output:

NOTICE: safety profile applied (--transfers 4 --checkers 8)
Would transfer 94 files

10. Example 10

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --transfers 8 --checkers 16

Expected output:

NOTICE: safety profile applied (--transfers 8 --checkers 16)
Would transfer 100 files

11. Example 11

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --log-level INFO

Expected output:

NOTICE: safety profile applied (--log-level INFO)
Would transfer 106 files

12. Example 12

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --stats 30s

Expected output:

NOTICE: safety profile applied (--stats 30s)
Would transfer 112 files

13. Example 13

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --max-age 7d

Expected output:

NOTICE: safety profile applied (--max-age 7d)
Would transfer 118 files

14. Example 14

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --max-size 300M

Expected output:

NOTICE: safety profile applied (--max-size 300M)
Would transfer 124 files

15. Example 15

Input command:

rclone sync /srv/site remote:site/current --dry-run -vv --error-on-no-transfer

Expected output:

NOTICE: safety profile applied (--error-on-no-transfer)
Would transfer 130 files