Commit graph

17 commits

Author SHA1 Message Date
Jason Colyer
c74820db07 Modify file restore to rectify tar issue
Fixed typo in run_pipeline! function
  -> Open3.pieline to Open3.pipeline
2019-01-17 10:07:29 -06:00
Jason Colyer
f88b464bf3 Modify file restore to rectify tar issue
Adjusted run_pipeline! function
  to match rubocop syntax requirements
Adjusted run_pipeline! function
  to use variable instead of string interpolation
2019-01-17 10:07:29 -06:00
Jason Colyer
99b6f37fa5 Modify file restore to rectify tar issue
Changed run_pipeline! function to have use $ in regex
Changed run_pipeline! function to use Open3.pipeline
instead of Open3.pipeline_start
2019-01-17 10:07:06 -06:00
Jason Colyer
6de60ef295 Modified files.rb to handle tar error
Changed the run_pipeline! function to instead use Open3.pipeline_start
In doing so, the code is able to grab the last STDERR. In the case
where the error is the one from older tar versions (relating to ./),
it will not raise a Backup::Error. All other instances of command
failure will result in Backup::Error being raised.
2019-01-16 08:29:40 -06:00
gfyoung
3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Jacob Vosmaer
6dfb0b4b31 Consistently use tar lookup function 2018-06-07 13:39:34 +02:00
Jacob Vosmaer (GitLab)
a0808df0b6 Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
Bob Van Landuyt
e3ff928c75 Describe workaround when restore fails because of Errno::EBUSY
When `Errno::EBUSY` is raised during restore, this could indicate that
the directory being restored into is a mountpoint. In this case we
explain the user how to retry the restore.
2018-04-23 17:24:29 +02:00
Balasankar "Balu" C
8785f23795 Move existing dirs to a temp location while restore
Instead of renaming existing storage directories to a timestamped
format, create a timestamped directory in a temporary location and move
the individual files and folders inside storage directories to it. This
helps us with nested storage directories.
2018-03-30 11:38:36 +05:30
julien MILLAU
a331a06aa8 Ignore "lost+found" folder during backup on a volume 2017-12-20 08:11:13 +00:00
Douwe Maan
87c9df29ce Don’t exclude some file in lib from rubocop 2017-02-23 09:32:42 -06:00
Drew Blessing
d6584c94a4 # This is a combination of 2 commits.
# This is the 1st commit message:

Add `copy` backup strategy to combat file changed errors

The backup Rake task used to stream data directly from the live
data directory into the backup. Under many circumstances this worked
OK. However, really active instances would experience a 'file changed
as we read it' error - especially with data like the registry. This
now copies the data first, then compresses it. It will take a bit
more disk space while the backup is in progress, but it's a
necessary thing.

# The commit message #2 will be skipped:

#	Add env var
2017-02-21 16:03:54 -06:00
bogdanvlviv
96ebc8c4f7 Use File::exist? instead of File::exists?
Since version ruby-2.2.0, method `File::exists?` is deprecated.
2016-08-11 13:54:45 +03:00
Jacob Vosmaer
58260a0327 Do no rely on basename of builds, uploads 2015-10-16 17:16:17 +02:00
Jacob Vosmaer
7d58489fd9 Remove unused variable 2015-10-06 15:22:08 +02:00
Jacob Vosmaer
7b71727c56 Remove old "files" tarball explicitly 2015-10-06 15:10:13 +02:00
Jacob Vosmaer
d3734fbd89 Use tar for intermediate backup storage
During the backup we create an intermediate copy of two directories:
builds and uploads. Instead of creating many small files with 'cp
-r', we now use tar (and fast gzip) to create single intermediate
files. This saves on disk IO and disk space while creating a backup.
2015-10-06 14:43:19 +02:00