Remove bash -c prefix for pg_dump command
				
					
				
			need to keep the `sudo -u postgres pg_dump ..` part as simple as possible, since must declare `sudoers` allowance for that
This commit is contained in:
		
							parent
							
								
									24d632b7e3
								
							
						
					
					
						commit
						ae7cb45ab3
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		|  | @ -28,7 +28,6 @@ import os | ||||||
| import re | import re | ||||||
| 
 | 
 | ||||||
| from rattail_fabric2 import apt, append, contains, sed, uncomment | from rattail_fabric2 import apt, append, contains, sed, uncomment | ||||||
| from rattail.util import shlex_join |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def install(c): | def install(c): | ||||||
|  | @ -224,7 +223,6 @@ def dump_db(c, name, port=None, exclude_tables=None, | ||||||
|     if skip_raw_file: |     if skip_raw_file: | ||||||
|         tmp_name = f'/tmp/{gz_name}' |         tmp_name = f'/tmp/{gz_name}' | ||||||
|         cmd = f'{cmd} | gzip -c > {tmp_name}' |         cmd = f'{cmd} | gzip -c > {tmp_name}' | ||||||
|         cmd = shlex_join(['bash', '-c', cmd]) |  | ||||||
|         c.sudo(cmd, user='postgres') |         c.sudo(cmd, user='postgres') | ||||||
|         # TODO: should remove this file |         # TODO: should remove this file | ||||||
|         c.run(f"cp {tmp_name} {gz_name}") |         c.run(f"cp {tmp_name} {gz_name}") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar