# Can i move my flags to config options?

**URL:** <https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718>\
**Category:** Help and Support\
**Created:** [November 3, 2023, 11:48pm UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718 "2023-11-03T23:48:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcb](https://forum.rclone.org/letter_avatar_proxy/v4/letter/g/bbe5ce/32.png) [@gcb](https://forum.rclone.org/u/gcb)\
**Post date:** [November 3, 2023, 11:48pm UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718/1 "2023-11-03T23:48:50Z")

</div>

rclone is great but my setup is feeling a little messy. Mostly i have scripts for each "operation". And they duplicate a lot.

I already had to learn new bash tricks to handle the many command line flags (actually proud of it and use this pattern of comment flags everywhere now 🙂 ), and now I was about to centralize them in a single file per remote... but then i realized: I may be underutilizing the config file!

here's a sample script (i have `$provider-[pull|push|diffcheck].sh` which ends up being some dozen files).

```auto
#!/bin/env bash

set -e

RCLONE=/usr/bin/rclone
RCLONEFLAGS=(
	# --dry-run
	--interactive

	--log-file b2push.log
	--color ALWAYS # doesn't seem to work with log-file :/
	--one-file-system # Don't cross filesystem boundaries
	# --update # Skip files that are newer on the destination (defeats SYNC purpose i guess?)
	--create-empty-src-dirs # be on the safe side of user-side-encryption crap
	--log-level INFO
	--check-first # do whatever before starting to transfer
	--ignore-checksum # Skip post copy check of checksums (i might regret this later, but for now, save some bandwidth)
	# --checksum # Check for changes with size & checksum (if available, or fallback to size only). (again, i might regret later. but save some bandwidth. or can the client get this directly from b2/s3/etc wout downloading the data?)
	# --b2-disable-checksum # Disable checksums for large (> upload cutoff) files (i guess this option answers my question above)
	--b2-hard-delete
	# --b2-copy-cutoff SizeSuffix # Cutoff for switching to multipart copy (default 4Gi)
	# --progress # show progress
	--metadata
	# --disable CaseInsensitive, DuplicateFiles, ReadMimeType, WriteMimeType, CanHaveEmptyDirectories, BucketBased, BucketBasedRootOK, SetTier, GetTier, ServerSideAcrossConfigs, IsLocal, SlowModTime, SlowHash, ReadMetadata, WriteMetadata, UserMetadata, FilterAware, PartialUploads, NoMultiThreading, Overlay, Purge, Copy, Move, DirMove, ChangeNotify, UnWrap, WrapFs, SetWrapper, DirCacheFlush, PublicLink, PutUnchecked, PutStream, MergeDirs, CleanUp, ListR, About, OpenWriterAt, OpenChunkWriter, UserInfo, Disconnect, Command, Shutdown
	--human-readable
	--fast-list
	--disable-http2
	--no-unicode-normalization
	--stats 30s # nothing seems to work when using log-file :/ tail -f it is
	--stats-file-name-length 0
	#--refresh-times # Refresh the modtime of remote files
	# --stats-log-level INFO # Log level to show --stats output DEBUG|INFO

	
	--exclude "ecryptfs.json"
        --exclude ".encfs6.xml"
	
)

RSYNC="${RCLONE} sync ${RCLONEFLAGS[@]}"

set -x

${RSYNC} /home/me/cloud/b2 b2:bucket1/some_dir

```

my gdrive one is even worse 🙂 and there are others. not even counting the crypt ones.

So, can i move these options to my `rclone.conf`?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 3, 2023, 11:52pm UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718/2 "2023-11-03T23:52:29Z")

</div>

> [@gcb](#):
>
> So, can i move these options to my `rclone.conf`?

[global flags](https://rclone.org/flags/) such as `--log-level` cannot be moved into config file

[backend/remote flags](https://rclone.org/flags/#backend) such as [--b2-hard-delete](https://--b2-hard-delete), can be moved into the config file as `hard_delete`

---

<div class="post-metadata">

**Author:** ![gcb](https://forum.rclone.org/letter_avatar_proxy/v4/letter/g/bbe5ce/32.png) [@gcb](https://forum.rclone.org/u/gcb)\
**Post date:** [November 3, 2023, 11:55pm UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718/3 "2023-11-03T23:55:32Z")

</div>

--b2-hard-delete was the only one that was already there because it is mentioned in the b2 guide.

So i'm out of luck for all the others? you mention globals... are "flags for copy/sync" also considered globals?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [November 4, 2023, 12:05am UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718/4 "2023-11-04T00:05:41Z")

</div>

> [@gcb](#):
>
> are "flags for copy/sync" also considered globals?

command flags cannot go into the config file, same as global.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [December 4, 2023, 12:06am UTC](https://forum.rclone.org/t/can-i-move-my-flags-to-config-options/42718/5 "2023-12-04T00:06:08Z")

</div>

Closed on December 4, 2023, 12:06am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
