Skip to content

Commit

Permalink
rename test_rclone_data folder to rclone_test_data
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv6 committed Aug 10, 2019
1 parent 4a53462 commit 62163ca
Show file tree
Hide file tree
Showing 24 changed files with 130 additions and 130 deletions.
2 changes: 1 addition & 1 deletion examples/filter_rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# rclone_jobber is not affiliated with rclone.
##############################################################################

# paths in this file are from source="~/test_rclone_data/"
# paths in this file are from source="~/rclone_test_data/"

########################## 1) includes #######################################
+ direc0/**
Expand Down
2 changes: 1 addition & 1 deletion examples/filter_rules_excld
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# rclone_jobber is not affiliated with rclone.
##############################################################################

# Paths in this file are from source="~/test_rclone_data/".
# Paths in this file are from source="~/rclone_test_data/".
# The sections alternate between include and exclude, progressing from fine to coarse grained.

########################## 1) include specific files #########################
Expand Down
2 changes: 1 addition & 1 deletion examples/job_backup_to_USB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#substitute $rclone_jobber and $usb with paths on your system
rclone_jobber=$rclone_jobber #path to rclone_jobber directory

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$usb/test_rclone_backup"
move_old_files_to="dated_files"
options="--filter-from=$rclone_jobber/examples/filter_rules --checksum"
Expand Down
2 changes: 1 addition & 1 deletion examples/job_backup_to_USB_excld.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#substitute $rclone_jobber and $usb with paths on your system
rclone_jobber=$rclone_jobber #path to rclone_jobber directory

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$usb/test_rclone_backup"
move_old_files_to="dated_files"
options="--filter-from=$rclone_jobber/examples/filter_rules_excld --checksum"
Expand Down
2 changes: 1 addition & 1 deletion examples/job_backup_to_USB_minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
##############################################################################

#substitute $rclone_jobber and $usb with paths on your system
source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$usb/test_rclone_backup"
options="--dry-run"

Expand Down
2 changes: 1 addition & 1 deletion examples/job_backup_to_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#substitute $rclone_jobber and ${remote} with paths on your system
rclone_jobber=$rclone_jobber #path to rclone_jobber directory

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="${remote}:"
move_old_files_to="dated_directory"
options="--filter-from=$rclone_jobber/examples/filter_rules"
Expand Down
56 changes: 28 additions & 28 deletions examples/setup_test_data_directory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,45 @@
# Permissions beyond the scope of this license may be available at https://github.com/wolfv6/rclone_jobber/issues.
###########################################################################

# setup ~/test_rclone_data directory for rclone_jobber.sh
# setup ~/rclone_test_data directory for rclone_jobber.sh
#########################################################

#delete and recreate test_rclone_data
rm -r ~/test_rclone_data
mkdir ~/test_rclone_data
#delete and recreate rclone_test_data
rm -r ~/rclone_test_data
mkdir ~/rclone_test_data

mkdir ~/test_rclone_data/direc_empty
mkdir ~/rclone_test_data/direc_empty

mkdir ~/test_rclone_data/direc0
touch ~/test_rclone_data/direc0/f0
mkdir ~/rclone_test_data/direc0
touch ~/rclone_test_data/direc0/f0

mkdir ~/test_rclone_data/direc1
touch ~/test_rclone_data/direc1/f1
mkdir ~/rclone_test_data/direc1
touch ~/rclone_test_data/direc1/f1

mkdir ~/test_rclone_data/direc1/direc1a
touch ~/test_rclone_data/direc1/direc1a/f1a
mkdir ~/rclone_test_data/direc1/direc1a
touch ~/rclone_test_data/direc1/direc1a/f1a

mkdir ~/test_rclone_data/direc1/direc1b
touch ~/test_rclone_data/direc1/direc1b/f1b
mkdir ~/rclone_test_data/direc1/direc1b
touch ~/rclone_test_data/direc1/direc1b/f1b

#files and directory names ending in "_exc"
mkdir ~/test_rclone_data/direc1/direc1c_exc
touch ~/test_rclone_data/direc1/direc1c_exc/f1c
mkdir ~/rclone_test_data/direc1/direc1c_exc
touch ~/rclone_test_data/direc1/direc1c_exc/f1c

touch ~/test_rclone_data/direc1/f2_exc
touch ~/test_rclone_data/direc1/f3_exc.txt
touch ~/test_rclone_data/direc1/f4_excy
touch ~/test_rclone_data/direc1/f5_exc.not.txt
touch ~/test_rclone_data/direc1/f6.bak
touch ~/rclone_test_data/direc1/f2_exc
touch ~/rclone_test_data/direc1/f3_exc.txt
touch ~/rclone_test_data/direc1/f4_excy
touch ~/rclone_test_data/direc1/f5_exc.not.txt
touch ~/rclone_test_data/direc1/f6.bak

#hidden directories and files
touch ~/test_rclone_data/.bashrc
touch ~/test_rclone_data/direc1/.hidden
touch ~/test_rclone_data/direc1/.thingrc
mkdir ~/test_rclone_data/direc1/.hide
touch ~/test_rclone_data/direc1/.hide/f8
mkdir ~/test_rclone_data/direc1/.git
touch ~/test_rclone_data/direc1/.git/f7
touch ~/rclone_test_data/.bashrc
touch ~/rclone_test_data/direc1/.hidden
touch ~/rclone_test_data/direc1/.thingrc
mkdir ~/rclone_test_data/direc1/.hide
touch ~/rclone_test_data/direc1/.hide/f8
mkdir ~/rclone_test_data/direc1/.git
touch ~/rclone_test_data/direc1/.git/f7

#display test data directory
tree -a ~/test_rclone_data
tree -a ~/rclone_test_data
8 changes: 4 additions & 4 deletions rclone_jobber_tutorial.org
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The "examples" directory contains all the scripts used by this tutorial.
This tutorial's example scripts backup a small test directory.

The [[./examples/setup_test_data_directory.sh][setup_test_data_directory.sh]] script will setup the small test directory.
It recursively deletes the ~/test_rclone_data directory and rebuilds a fresh copy.
It recursively deletes the ~/rclone_test_data directory and rebuilds a fresh copy.
To setup a test directory from the command line:
: $ ~/rclone_jobber/examples/setup_test_data_directory.sh

Expand Down Expand Up @@ -109,7 +109,7 @@ Once you have the test directories and path variables setup, you can take rclone
Here is a minimal backup-job script for rclone_jobber:
: #!/usr/bin/env sh
:
: source="$HOME/test_rclone_data"
: source="$HOME/rclone_test_data"
: dest="$usb/test_rclone_backup"
:
: $rclone_jobber/rclone_jobber.sh "$source" "$dest"
Expand Down Expand Up @@ -145,7 +145,7 @@ Each backup job contains arguments and a call to rclone_jobber.sh.
Here is an example backup job with all the rclone_jobber.sh arguments defined:
: #!/usr/bin/env sh
:
: source="$HOME/test_rclone_data"
: source="$HOME/rclone_test_data"
: dest="$usb/test_rclone_backup"
: move_old_files_to="dated_files"
: options="--filter-from=$rclone_jobber/examples/filter_rules --checksum --dry-run"
Expand Down Expand Up @@ -569,7 +569,7 @@ Then restore data:
: $ ~/rclone_jobber/examples/job_restore_last_snapshot.sh

Verify that the files were faithfully restored:
: $ diff -r $HOME/test_rclone_data/direc0 /home/$USER/last_snapshot/direc0
: $ diff -r $HOME/rclone_test_data/direc0 /home/$USER/last_snapshot/direc0

Notice that rclone does not back up empty directories.

Expand Down
2 changes: 1 addition & 1 deletion test_suite/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Each of the following sections describes one test case.

Test-script names start with "test_".
Each test_ script creates two directories:
- test_rclone_data
- rclone_test_data
- test_rclone_backup

Each test_ script tests two or three job_ scripts.
Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_1d_backup_to_dated_directory.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="onedrive_test_rclone_backup_crypt:"
move_old_files_to="typo" #should give pop-up warning and default to "dated_directory"
options="--checksum"
Expand Down
6 changes: 3 additions & 3 deletions test_suite/job_1d_restore_from_dated_directory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
echo ">>>>>>>>>>>>>>>>>>> Enter time stamp of direc1b to restore <<<<<<<<<<<<<<<<<<<<"
read old
source="onedrive_test_rclone_backup_crypt:$old/direc1/direc1b"
dest="$HOME/test_rclone_data/direc1/direc1b_$old"
dest="$HOME/rclone_test_data/direc1/direc1b_$old"

printf "\n*** restoring directory direc1b ***\n"
rclone copy $source $dest

#################### output for testing ################
printf "*** data directory ***\n"
tree ~/test_rclone_data
tree ~/rclone_test_data

f1b="$HOME/test_rclone_data/direc1/direc1b_$old/f1b"
f1b="$HOME/rclone_test_data/direc1/direc1b_$old/f1b"
echo "contents of $f1b: $(cat $f1b)"
2 changes: 1 addition & 1 deletion test_suite/job_USB_backup_to_USB.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$USB/test_rclone_backup"
move_old_files_to="dated_files"
options="--checksum"
Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_USB_restore_from_USB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#source and destination paths
source="$USB/test_rclone_backup/old_files/direc1/f1_*"
dest="$HOME/test_rclone_data/direc1"
dest="$HOME/rclone_test_data/direc1"

#restore file
rclone copy $source $dest
2 changes: 1 addition & 1 deletion test_suite/job_check_empty_source.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$USB/test_rclone_backup"
move_old_files_to="dated_files"
monitoring_URL="https://hchk.io/c74b2d3c-dfb9-4cdb-b81a-872618dfd0b8"
Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_check_null_dest.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest=""
move_old_files_to="dated_files"
monitoring_URL="https://hchk.io/c74b2d3c-dfb9-4cdb-b81a-872618dfd0b8"
Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_dir_backup_to_dated_directory.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$HOME/test_rclone_backup"
move_old_files_to="typo" #should give pop-up warning and move old data to dated_directory

Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_dir_restore_from_dated_directory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
echo "\n>>>>>>>>>>>>>> Enter time stamp of direc1b to restore <<<<<<<<<<<<<<<<<"
read old
source="$HOME/test_rclone_backup/$old/direc1/direc1b"
dest="$HOME/test_rclone_data/direc1/direc1b_$old"
dest="$HOME/rclone_test_data/direc1/direc1b_$old"

printf "\n*** restoring deleted directory direc1b ***\n"
rclone copy $source $dest
2 changes: 1 addition & 1 deletion test_suite/job_snapshot_backup_old_data_to_delete.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

source="$HOME/test_rclone_data"
source="$HOME/rclone_test_data"
dest="$HOME/test_rclone_backup"
options="--filter-from=filter_rules"

Expand Down
2 changes: 1 addition & 1 deletion test_suite/job_snapshot_restore_from_last_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#source and destination paths
source="$HOME/test_rclone_backup/last_snapshot/direc1/direc1b"
dest="$HOME/test_rclone_data/direc1/direc1b_last_snapshot"
dest="$HOME/rclone_test_data/direc1/direc1b_last_snapshot"

#restore directory
rclone copy $source $dest
30 changes: 15 additions & 15 deletions test_suite/test_1d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

############## setup directories #############

#delete and recreate test_rclone_data
rm -r ~/test_rclone_data
mkdir ~/test_rclone_data
#delete and recreate rclone_test_data
rm -r ~/rclone_test_data
mkdir ~/rclone_test_data

mkdir ~/test_rclone_data/direc0
touch ~/test_rclone_data/direc0/f0
mkdir ~/rclone_test_data/direc0
touch ~/rclone_test_data/direc0/f0

mkdir ~/test_rclone_data/direc1
touch ~/test_rclone_data/direc1/f1
mkdir ~/rclone_test_data/direc1
touch ~/rclone_test_data/direc1/f1

mkdir ~/test_rclone_data/direc1/direc1a
touch ~/test_rclone_data/direc1/direc1a/f1a
mkdir ~/rclone_test_data/direc1/direc1a
touch ~/rclone_test_data/direc1/direc1a/f1a

mkdir ~/test_rclone_data/direc1/direc1b
printf "text" > ~/test_rclone_data/direc1/direc1b/f1b
mkdir ~/rclone_test_data/direc1/direc1b
printf "text" > ~/rclone_test_data/direc1/direc1b/f1b

#delete test_rclone_backup
rclone purge onedrive_test_rclone_backup_crypt:
Expand All @@ -33,16 +33,16 @@ printf "\n*** backup ***\n"
rclone ls onedrive_test_rclone_backup_crypt:

printf "\n*** data directory ***\n"
tree ~/test_rclone_data
tree ~/rclone_test_data

printf "\n*** deleting top directory direc0 ***\n"
rm -r ~/test_rclone_data/direc0
rm -r ~/rclone_test_data/direc0

printf "*** deleting sub-directory direc1b ***\n"
rm -r ~/test_rclone_data/direc1/direc1b
rm -r ~/rclone_test_data/direc1/direc1b

printf "*** data directory (should be missing direc0 and direc1b) ***\n"
tree ~/test_rclone_data
tree ~/rclone_test_data

printf "\n*** performing second backup (should have pop-up WARNING: job_1d_backup_to_dated_directory.sh) ***\n"
./job_1d_backup_to_dated_directory.sh
Expand Down
28 changes: 14 additions & 14 deletions test_suite/test_USB.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

############## setup directories #############

#delete and recreate test_rclone_data
rm -r ~/test_rclone_data
mkdir ~/test_rclone_data
#delete and recreate rclone_test_data
rm -r ~/rclone_test_data
mkdir ~/rclone_test_data

mkdir ~/test_rclone_data/direc0
touch ~/test_rclone_data/direc0/f0
mkdir ~/rclone_test_data/direc0
touch ~/rclone_test_data/direc0/f0

mkdir ~/test_rclone_data/direc1
printf "original" > ~/test_rclone_data/direc1/f1
mkdir ~/rclone_test_data/direc1
printf "original" > ~/rclone_test_data/direc1/f1

mkdir ~/test_rclone_data/direc1/direc1a
touch ~/test_rclone_data/direc1/direc1a/f1a
mkdir ~/rclone_test_data/direc1/direc1a
touch ~/rclone_test_data/direc1/direc1a/f1a

mkdir ~/test_rclone_data/direc1/direc1b
touch ~/test_rclone_data/direc1/direc1b/f1b
mkdir ~/rclone_test_data/direc1/direc1b
touch ~/rclone_test_data/direc1/direc1b/f1b

#delete and recreate test_rclone_backup
rm -r $usb/test_rclone_backup
Expand All @@ -31,10 +31,10 @@ printf "\n*** performing first backup ***\n"
./job_USB_backup_to_USB.sh

printf "\n*** editing f1 file ***\n"
printf "edited" > ~/test_rclone_data/direc1/f1
printf "edited" > ~/rclone_test_data/direc1/f1

printf "*** data directory ***\n"
tree $HOME/test_rclone_data
tree $HOME/rclone_test_data

printf "\n*** performing second backup ***\n"
./job_USB_backup_to_USB.sh
Expand All @@ -46,4 +46,4 @@ printf "\n*** restoring old f1 ***\n"
./job_USB_restore_from_USB.sh

printf "*** data directory (f1_<timestamp> and f1 should be in direc1) ***\n"
tree $HOME/test_rclone_data
tree $HOME/rclone_test_data
Loading

0 comments on commit 62163ca

Please sign in to comment.