Hello Folks
Apologies for troubling everyone with what I'm sure is a very lame question about bash scripting ineptitude, but... When I run the following script, I get the out put at bottom - that is 'duplicity: error: no such option: --no-encryption --full-if-older-than' So, why isn't duplicity interpreting the options properly as two distinct options? Thanks, Morgan. duplicity_backup.sh: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #!/bin/bash ### Added by root 040420, see here: ### https://www.linux-magazine.com/Online/Features/Cloud-Backup-with-Duplicity ### https://help.ubuntu.com/community/DuplicityBackupHowto ### https://debian-administration.org/article/209/Unattended_Encrypted_Incremental_Network_Backups_Part_1 # Passphrase for GPG key #export PASSPHRASE=<Passphrase> # Key ID of the GPG key #export GPG_KEY=<key-ID> # Amazon access credentials #export AWS_ACCESS_KEY_ID=<Key-ID> #export AWS_SECRET_ACCESS_KEY=<secret key> # Backup source SOURCE="--include-filelist /usr/local/var/duplicity/duplicity-backup-files" # Backup targets # Local backup LOCAL_BACKUP=file:///mnt/RAID1-699GiB/backup/duplicity # Backup via SSH #SSH_BACKUP=sftp://user@remote/backup # Backup to Ubuntu One #UBUNTU_ONE=u1+http://<target_folder> # Amazon S3 #AMAZON_S3=s3+http://<Bucket-Name> # Duplicity commands # Local #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${LOCAL_BACKUP} duplicity --no-encryption --full-if-older-than 1M ${SOURCE} ${LOCAL_BACKUP} >>/var/log/duplicity/backup.log # Deleting old local backups duplicity remove-older-than 3M --force ${LOCAL_BACKUP} >>/var/log/duplicity/remove.log # SSH #export FTP_PASSWORD=<SSH-Password> #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${SSH_BACKUP} #unset FTP_PASSWORD # Ubuntu One #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${UBUNTU_ONE} # Amazon S3 #duplicity --encrypt-key ${GPG_KEY} --s3-use-new-style --s3-european-buckets ${SOURCE} ${AMAZON_S3} # Reset Passwords #unset AWS_ACCESS_KEY_ID #unset AWS_SECRET_ACCESS_KEY #unset PASSPHRASE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [root@frontserver /]# duplicity_backup.sh Usage: duplicity [full|incremental] [options] source_dir target_url duplicity [restore] [options] source_url target_dir duplicity verify [options] source_url target_dir duplicity collection-status [options] target_url duplicity list-current-files [options] target_url duplicity cleanup [options] target_url duplicity remove-older-than time [options] target_url duplicity remove-all-but-n-full count [options] target_url duplicity remove-all-inc-of-but-n-full count [options] target_url duplicity replicate source_url target_url Backends and their URL formats: cf+http://container_name file:///some_dir ftp://user[:password]@other.host[:port]/some_dir ftps://user[:password]@other.host[:port]/some_dir hsi://user[:password]@other.host[:port]/some_dir imap://user[:password]@other.host[:port]/some_dir rsync://user[:password]@other.host[:port]::/module/some_dir rsync://user[:password]@other.host[:port]/relative_path rsync://user[:password]@other.host[:port]//absolute_path s3://other.host[:port]/bucket_name[/prefix] s3+http://bucket_name[/prefix] boto3+s3://bucket_name[/prefix] scp://user[:password]@other.host[:port]/some_dir ssh://user[:password]@other.host[:port]/some_dir swift://container_name pca://container_name tahoe://alias/directory webdav://user[:password]@other.host/some_dir webdavs://user[:password]@other.host/some_dir gdocs://user[:password]@other.host/some_dir pydrive://[hidden email]/some_dir mega://user[:password]@other.host/some_dir copy://user[:password]@other.host/some_dir dpbx:///some_dir onedrive://some_dir azure://container_name b2://account_id[:application_key]@bucket_name/[some_dir/] mf://user[:password]@other.host/some_dir Commands: cleanup <target_url> collection-status <target_url> full <source_dir> <target_url> incr <source_dir> <target_url> list-current-files <target_url> restore <source_url> <target_dir> remove-older-than <time> <target_url> remove-all-but-n-full <count> <target_url> remove-all-inc-of-but-n-full <count> <target_url> verify <target_url> <source_dir> replicate <source_url> <target_url> duplicity: error: no such option: --no-encryption --full-if-older-than [root@frontserver /]# -- Morgan Read P 07563-650.923 E [hidden email] _______________________________________________ Duplicity-talk mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/duplicity-talk |
On 04.04.2020 13:28, Morgan Read via Duplicity-talk wrote:
> Hello Folks > > Apologies for troubling everyone with what I'm sure is a very lame > question about bash scripting ineptitude, but... > > When I run the following script, I get the out put at bottom - that is > 'duplicity: error: no such option: --no-encryption > --full-if-older-than' So, why isn't duplicity interpreting the > options properly as two distinct options? Thanks, Morgan. > > duplicity_backup.sh: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > #!/bin/bash > ### Added by root 040420, see here: > ### https://www.linux-magazine.com/Online/Features/Cloud-Backup-with-Duplicity > ### https://help.ubuntu.com/community/DuplicityBackupHowto > ### https://debian-administration.org/article/209/Unattended_Encrypted_Incremental_Network_Backups_Part_1 > # Passphrase for GPG key > #export PASSPHRASE=<Passphrase> > > # Key ID of the GPG key > #export GPG_KEY=<key-ID> > > # Amazon access credentials > #export AWS_ACCESS_KEY_ID=<Key-ID> > #export AWS_SECRET_ACCESS_KEY=<secret key> > > # Backup source > SOURCE="--include-filelist /usr/local/var/duplicity/duplicity-backup-files" > > # Backup targets > # Local backup > LOCAL_BACKUP=file:///mnt/RAID1-699GiB/backup/duplicity > # Backup via SSH > #SSH_BACKUP=sftp://user@remote/backup > # Backup to Ubuntu One > #UBUNTU_ONE=u1+http://<target_folder> > # Amazon S3 > #AMAZON_S3=s3+http://<Bucket-Name> > > # Duplicity commands > # Local > #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${LOCAL_BACKUP} > duplicity --no-encryption --full-if-older-than 1M ${SOURCE} > ${LOCAL_BACKUP} >>/var/log/duplicity/backup.log > # Deleting old local backups > duplicity remove-older-than 3M --force ${LOCAL_BACKUP} >>> /var/log/duplicity/remove.log > # SSH > #export FTP_PASSWORD=<SSH-Password> > #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${SSH_BACKUP} > #unset FTP_PASSWORD > # Ubuntu One > #duplicity --encrypt-key ${GPG_KEY} ${SOURCE} ${UBUNTU_ONE} > # Amazon S3 > #duplicity --encrypt-key ${GPG_KEY} --s3-use-new-style > --s3-european-buckets ${SOURCE} ${AMAZON_S3} > > # Reset Passwords > #unset AWS_ACCESS_KEY_ID > #unset AWS_SECRET_ACCESS_KEY > #unset PASSPHRASE > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > [root@frontserver /]# duplicity_backup.sh > Usage: > duplicity [full|incremental] [options] source_dir target_url > duplicity [restore] [options] source_url target_dir > duplicity verify [options] source_url target_dir > duplicity collection-status [options] target_url > duplicity list-current-files [options] target_url > duplicity cleanup [options] target_url > duplicity remove-older-than time [options] target_url > duplicity remove-all-but-n-full count [options] target_url > duplicity remove-all-inc-of-but-n-full count [options] target_url > duplicity replicate source_url target_url > > Backends and their URL formats: > cf+http://container_name > file:///some_dir > ftp://user[:password]@other.host[:port]/some_dir > ftps://user[:password]@other.host[:port]/some_dir > hsi://user[:password]@other.host[:port]/some_dir > imap://user[:password]@other.host[:port]/some_dir > rsync://user[:password]@other.host[:port]::/module/some_dir > rsync://user[:password]@other.host[:port]/relative_path > rsync://user[:password]@other.host[:port]//absolute_path > s3://other.host[:port]/bucket_name[/prefix] > s3+http://bucket_name[/prefix] > boto3+s3://bucket_name[/prefix] > scp://user[:password]@other.host[:port]/some_dir > ssh://user[:password]@other.host[:port]/some_dir > swift://container_name > pca://container_name > tahoe://alias/directory > webdav://user[:password]@other.host/some_dir > webdavs://user[:password]@other.host/some_dir > gdocs://user[:password]@other.host/some_dir > pydrive://[hidden email]/some_dir > mega://user[:password]@other.host/some_dir > copy://user[:password]@other.host/some_dir > dpbx:///some_dir > onedrive://some_dir > azure://container_name > b2://account_id[:application_key]@bucket_name/[some_dir/] > mf://user[:password]@other.host/some_dir > > Commands: > cleanup <target_url> > collection-status <target_url> > full <source_dir> <target_url> > incr <source_dir> <target_url> > list-current-files <target_url> > restore <source_url> <target_dir> > remove-older-than <time> <target_url> > remove-all-but-n-full <count> <target_url> > remove-all-inc-of-but-n-full <count> <target_url> > verify <target_url> <source_dir> > replicate <source_url> <target_url> > > duplicity: error: no such option: --no-encryption --full-if-older-than > [root@frontserver /]# > right Morgan, your issue is very much off topic here. the bash script seems to be line wrapped by your email program is generally in ruins (comments, changes etc.) . i also expect it misses some quotation marks. how about using https://duply.net if your shell foo is not that sophisticated? there are lot's of howtos out there for setting it up (cronjob etc.) if you want to learn i suggest you try to work out a working command line without scripting and create a script after you succeeded in that. ..ede/duply.net _______________________________________________ Duplicity-talk mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/duplicity-talk |
In reply to this post by duplicity-talk mailing list
Just a guess. Maybe the visual space between the two is something else. In a text editor, remove the space and insert using the spacebar. ...Ken On Sat, Apr 4, 2020 at 6:28 AM Morgan Read via Duplicity-talk <[hidden email]> wrote: Hello Folks _______________________________________________ Duplicity-talk mailing list [hidden email] https://lists.nongnu.org/mailman/listinfo/duplicity-talk |
Free forum by Nabble | Edit this page |