factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

Add an option to pass tar parameters to the get:files-dump command #138

Closed mikran closed 3 years ago

mikran commented 3 years ago

When working with big files directories it would be useful to get to choose a little bit better what is included in the files dump archive.

For example to quickly get new files added or modified after last time I could run command

phab --config=myhost get:files-dump -- --newer="`date -r previous-archive.tgz`"
stmh commented 3 years ago

sounds like a good idea. in the mean time you can use the restic backup method to backup remote files and restore them locally (using restic on your local, not phab). As restic only backup new or changed files this might give you a speed bump es well.

See the docs here: https://github.com/factorial-io/phabalicious/blob/release/3.6.0/docs/offsite-backups.md

stmh commented 3 years ago

you might need to escape the double quotes, depending on your shell. For fish I need to run

../phabalicious/bin/phab get:files-dump -vv -- --newer=\"(date -r mbb--0.40.37--2021-02-12--09-32-14.sql.gz)\"

otherwise the date command wont be evaluated and the complete string will be passed to tar and evaluated on the remote host.