This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
onny:notizen [2022/05/30 22:24] – 10.25.0.100 | onny:notizen [2023/11/10 14:16] – [avahi] 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== ArchLinux ===== | ||
- | ==== system ==== | ||
- | set extra capabilities for process | ||
- | <code bash> | ||
- | sudo setcap ' | ||
- | </ | ||
- | directory permissions | ||
- | <code bash> | ||
- | namei -l / | ||
- | </ | ||
- | use acl to grant permission to files for specific user | ||
- | <code bash> | ||
- | setfacl -R -m u:maddy:rX / | ||
- | </ | ||
- | pgrep get process pid by process name | ||
- | <code bash> | ||
- | $ pgrep sw3 | ||
- | 30636 | ||
- | </ | ||
- | set system time | ||
- | <code bash> | ||
- | timedatectl set-time " | ||
- | </ | ||
- | ==== packaging ==== | ||
- | git checkout aur package | ||
- | <code bash> | ||
- | git clone ssh:// | ||
- | </ | ||
- | === commands === | ||
- | update checksums inplace | ||
- | <code bash> | ||
- | updpkgsums | ||
- | </ | ||
- | building a package in a clean dev chroot, path for pacman conf ''/ | ||
- | <code bash> | ||
- | cd < | ||
- | ls PKGBUILD | ||
- | extra-x86_64-build # -c for cleaning up chroot. ~/ | ||
- | extra-x86_64-build -- -I ~/ | ||
- | </ | ||
- | advanced chroot with own packages preinstalled | ||
- | <code bash> | ||
- | mkdir ~/chroot | ||
- | export CHROOT=$HOME/ | ||
- | mkarchroot $CHROOT/ | ||
- | arch-nspawn $CHROOT/ | ||
- | makechrootpkg -r $CHROOT -I package-1.0-1-i686.pkg.tar.xz # -c for clean chroot | ||
- | # repackage: makechrootpkg -r / | ||
- | </ | ||
- | cheap python virtualenv | ||
- | <code bash> | ||
- | mkdir path | ||
- | ln -s / | ||
- | export PATH=" | ||
- | </ | ||
- | abs deprecated, using asp | ||
- | <code bash> | ||
- | asp export linux | ||
- | </ | ||
- | === PKGBUILD === | ||
- | Installation von Lizenzdateien: | ||
- | <code bash> | ||
- | install -D " | ||
- | </ | ||
- | Installation von Systemd-Units: | ||
- | <code bash> | ||
- | install -Dm644 " | ||
- | </ | ||
- | Installation von Docs: | ||
- | <code bash> | ||
- | install -Dm644 README.md " | ||
- | </ | ||
- | Installation von Tmpfiles: | ||
- | <code bash> | ||
- | install -Dm644 " | ||
- | </ | ||
- | Installation von Libs: | ||
- | <code bash> | ||
- | install -m644 libdouble-conversion.so.0.0.0* " | ||
- | </ | ||
- | do not strip binary files | ||
- | < | ||
- | options=(' | ||
- | </ | ||
- | Installation von ausführbare Dateien: | ||
- | <code bash> | ||
- | install -Dm755 shareLinkCreator " | ||
- | </ | ||
- | Nginx/ | ||
- | <code bash> | ||
- | if [[ -n $(which httpd 2> /dev/null) ]]; then | ||
- | | ||
- | fi | ||
- | | ||
- | # install apache .conf file if apache is installed | ||
- | if [[ -n $(which httpd 2> /dev/null) ]]; then | ||
- | install -d $pkgdir/ | ||
- | install -m 644 $srcdir/ | ||
- | fi | ||
- | } | ||
- | </ | ||
- | Zielname der Quelldatei ändern: | ||
- | <code bash> | ||
- | source=(" | ||
- | </ | ||
- | Architekturabhängige Build-Anweisung | ||
- | <code bash> | ||
- | | ||
- | cd " | ||
- | if [[ " | ||
- | make cudaHashcat64.bin | ||
- | else | ||
- | make cudaHashcat32.bin | ||
- | fi | ||
- | make nv_all | ||
- | } | ||
- | </ | ||
- | pkgver git | ||
- | <code bash> | ||
- | | ||
- | cd " | ||
- | #git describe --long | sed ' | ||
- | git log -1 --format=%cd.%h --date=short|tr -d - | ||
- | } | ||
- | </ | ||
- | Common install file example | ||
- | <code bash> | ||
- | post_install() { | ||
- | mkdir / | ||
- | getent group lool > /dev/null || groupadd -r lool > /dev/null | ||
- | getent passwd lool > /dev/null || useradd lool > /dev/null | ||
- | chown -R lool:lool / | ||
- | / | ||
- | } | ||
- | post_remove() { | + | ===== bash ===== |
- | | + | |
- | | + | |
- | } | + | |
- | </ | + | |
- | in pkgbuild reference | + | |
- | <code bash> | + | |
- | install=" | + | |
- | </ | + | |
- | === aurutils | + | |
- | install packages into build container | + | |
- | < | + | |
- | arch-chroot / | + | |
- | pacman --root=/ | + | |
- | </ | + | |
- | add gpg key into build container | + | |
- | <code bash> | + | |
- | sudo -u aur gpg --recv-keys EB774491D9FF06E2 | + | |
- | </ | + | |
- | rebuild prebuild package and add to custom AUR repo | + | |
- | <code bash> | + | |
- | fakepkg webkitgtk2 | + | |
- | sudo -u aur repo-add / | + | |
- | cp / | + | |
- | </ | + | |
- | ==== bluetooth ==== | + | |
- | Example session '' | + | |
- | <code bash> | + | |
- | # bluetoothctl | + | |
- | [bluetooth]# | + | |
- | [bluetooth]# | + | |
- | [bluetooth]# | + | |
- | [bluetooth]# | + | |
- | </ | + | |
- | ==== usefull stuff ==== | ||
- | pipe stderr to stdout | ||
- | <code bash> | ||
- | command 2>&1 >/ | ||
- | </ | ||
- | pipe stderr and stdout both to a file | ||
- | <code bash> | ||
- | command &> error_log | ||
- | </ | ||
- | locate pacnew files | ||
- | <code bash> | ||
- | find /etc -regextype posix-extended -regex " | ||
- | </ | ||
- | or search entire disk | ||
- | <code bash> | ||
- | find / -regextype posix-extended -regex " | ||
- | </ | ||
- | === swapfile on btrfs === | ||
- | <code bash> | ||
- | swapfile=$(losetup -f) #free loop device | ||
- | truncate -s 8G /swap # | ||
- | losetup $swapfile /swap #mount file to loop | ||
- | mkswap | ||
- | swapon | ||
- | </ | ||
- | search library availability in system, print file paths | ||
- | <code bash> | ||
- | ldconfig -p | grep blas | ||
- | </ | ||
- | |||
- | |||
- | ==== systemd nspawn (container) ==== | ||
- | <code bash> | ||
- | pacman -S arch-install-scripts | ||
- | btrfs subvol create / | ||
- | mkdir / | ||
- | pacstrap / | ||
- | systemctl enable --now systemd-networkd systemd-resolved | ||
- | systemd-nspawn --boot -nD / | ||
- | systemctl start systemd-nspawnd@archlinux-nextcloudcli | ||
- | machinectl shell root@archlinux-nextcloudcli /bin/bash -c " | ||
- | </ | ||
- | quit / exit / kill container: Hold '' | ||
- | |||
- | ==== systemd service ==== | ||
- | set environment | ||
- | <file - / | ||
- | [Unit] | ||
- | Description=PiRadio | ||
- | After=network-online.target | ||
- | After=bluetooth.service | ||
- | |||
- | [Service] | ||
- | Environment=" | ||
- | Type=simple | ||
- | User=piradio | ||
- | WorkingDirectory=/ | ||
- | ExecStartPre=/ | ||
- | ExecStart=/ | ||
- | Restart=on-abort | ||
- | |||
- | [Install] | ||
- | WantedBy=multi-user.target | ||
- | WantedBy=network-online.target | ||
- | </ | ||
- | ===== kernel ===== | ||
- | grep kernel config running system | ||
- | <code bahs> | ||
- | zcat / | ||
- | </ | ||
- | ===== fish ===== | ||
- | unset history | ||
- | < | ||
- | fish --private | ||
- | </ | ||
- | ===== bash ===== | ||
lzma hado compression and extraction | lzma hado compression and extraction | ||
<code bash> | <code bash> | ||
Line 331: | Line 88: | ||
chmod +x $FILE | chmod +x $FILE | ||
$FILE " | $FILE " | ||
- | </ | ||
- | ==== sed ==== | ||
- | Mit sed inplace eine Zeile zu einer Datei hinzufügen: | ||
- | <code bash> | ||
- | sed -i ' | ||
- | </ | ||
- | add to end of file | ||
- | <code bash> | ||
- | sed -i -e ' | ||
- | </ | ||
- | Comment out specific line matching a string | ||
- | <code bash> | ||
- | sudo sed -e '/ | ||
- | </ | ||
- | comment out multiple lines / range | ||
- | <code bash> | ||
- | sed -i "28,33 s/# *//" autogen.sh | ||
- | </ | ||
- | regex parse value of xml tags | ||
- | <code bash> | ||
- | sed -n ' | ||
- | </ | ||
- | delete multiple lines | ||
- | <code bash> | ||
- | sed -i ' | ||
</ | </ | ||
- | insert line after match | ||
- | <code bash> | ||
- | sed '/ | ||
- | </ | ||
==== grep ==== | ==== grep ==== | ||
regex match group | regex match group | ||
Line 388: | Line 116: | ||
fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} / | fd --type f -e doc -e docx -e pdf -i gabriel -x cp --backup=t {} / | ||
</ | </ | ||
- | ==== rg ==== | ||
- | |||
- | filter file type | ||
+ | find filenames unallowed characters | ||
<code bash> | <code bash> | ||
- | rg GPIO_CFG_2MA -g '*.h' | + | fd '[^A-Z a-züö@0-9._-]' |
</ | </ | ||
- | search file containing multiple strings/ | ||
- | <code bash> | ||
- | rg -lU --multiline-dotall ' | ||
- | </ | ||
- | |||
- | ==== curl ==== | ||
- | post data | ||
- | <code bash> | ||
- | curl --data " | ||
- | </ | ||
- | download and extract archive | ||
- | <code bash> | ||
- | curl http:// | ||
- | </ | ||
- | set host header | ||
- | <code bash> | ||
- | torify curl --header "Host: http.pi" | ||
- | </ | ||
- | ==== tcpdump ==== | ||
- | specific ports | ||
- | <code bash> | ||
- | tcpdump -i eth0 -q '(tcp port 80) or (tcp port 443)' -A | ||
- | </ | ||
- | exclude specific host | ||
- | <code bash> | ||
- | tcpdump -i eth0 -q '(ip or ip6) and (tcp port 80) or (tcp port 443) and not host ifconfig.co' | ||
- | </ | ||
==== patching ==== | ==== patching ==== | ||
=== appling === | === appling === | ||
Line 439: | Line 138: | ||
</ | </ | ||
+ | ==== xargs ==== | ||
+ | |||
+ | < | ||
+ | fd . | xargs -I {} rm " | ||
+ | </ | ||
===== rsync ===== | ===== rsync ===== | ||
custom ssh port | custom ssh port | ||
Line 463: | Line 167: | ||
</ | </ | ||
===== networking ===== | ===== networking ===== | ||
- | netcat | ||
- | <code bash> | ||
- | netcat -l 4444 | ||
- | </ | ||
- | <code bash> | ||
- | netcat playground.pi 4444 | ||
- | </ | ||
==== nftables ==== | ==== nftables ==== | ||
<code bash> | <code bash> | ||
Line 511: | Line 208: | ||
iptables -t nat -A OUTPUT -p tcp --dport 2222 -j DNAT --to 192.168.1.2: | iptables -t nat -A OUTPUT -p tcp --dport 2222 -j DNAT --to 192.168.1.2: | ||
</ | </ | ||
- | </ | ||
- | ==== ip ==== | ||
- | set address | ||
- | <code bash> | ||
- | ip address add dev usb0 172.16.42.1/ | ||
- | ip link set usb0 up | ||
- | </ | ||
- | route command example | ||
- | <code bash> | ||
- | ip route add 192.168.1.0/ | ||
- | ip route add default via 192.168.1.1 | ||
- | </ | ||
- | flush addresses | ||
- | <code bash> | ||
- | ip addr flush dev enp8s0 | ||
- | </ | ||
- | remove interface | ||
- | <code bash> | ||
- | ip link delete br0 | ||
- | </ | ||
- | delete address | ||
- | <code bash> | ||
- | ip addr del 192.168.178.20/ | ||
- | </ | ||
- | show only specific interface | ||
- | <code bash> | ||
- | ip a show wg0 | ||
</ | </ | ||
- | change mtu | ||
- | <code bash> | ||
- | ip link set dev eth0 mtu 1400 | ||
- | </ | ||
==== dnsmasq ==== | ==== dnsmasq ==== | ||
minimal hostapd and dnsmasq config | minimal hostapd and dnsmasq config | ||
Line 596: | Line 262: | ||
compression | compression | ||
<code bash> | <code bash> | ||
- | convert -density 200x200 -units PixelsPerInch -compress jpeg -quality 70 in.pdf out.pdf | + | gm convert -density 200x200 -units PixelsPerInch -compress jpeg -quality 70 in.pdf out.pdf |
</ | </ | ||
lossless merge | lossless merge | ||
Line 652: | Line 318: | ||
</ | </ | ||
===== security ===== | ===== security ===== | ||
+ | |||
+ | ==== web discovery ==== | ||
+ | |||
+ | === photon === | ||
+ | |||
+ | < | ||
+ | photon -u test.example.org | ||
+ | </ | ||
==== lynis ==== | ==== lynis ==== | ||
Line 667: | Line 341: | ||
==== wfuzz ==== | ==== wfuzz ==== | ||
<code bash> | <code bash> | ||
- | torify | + | wfuzz -c --hc 404 -w / |
- | torify | + | wfuzz -c --hc 404,403 -w / |
</ | </ | ||
Preparing data for LFI scan | Preparing data for LFI scan | ||
Line 683: | Line 357: | ||
* https:// | * https:// | ||
* wifite wifi auditing tool | * wifite wifi auditing tool | ||
+ | |||
+ | sec tools | ||
+ | |||
+ | * dirbuster | ||
+ | * https:// | ||
+ | * **tiger** - system sec scanner | ||
+ | * sub domain evaluation | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * subfinder (passive, external sources) | ||
+ | * vhost scanning | ||
+ | * https:// | ||
+ | * bettercap - wifi network | ||
+ | * iodine dns tunnel https:// | ||
+ | * command searchsploit in exploitdb | ||
+ | * NixOS for Pentesting Overview https:// | ||
===== chromium / chrome ===== | ===== chromium / chrome ===== | ||
Line 690: | Line 380: | ||
</ | </ | ||
===== docker ===== | ===== docker ===== | ||
- | Short example | + | |
+ | Pull | ||
<code bash> | <code bash> | ||
- | sudo systemctl start docker | + | docker |
- | gpasswd -a onny docker | + | docker |
- | | + | |
- | | + | |
</ | </ | ||
+ | |||
+ | Run | ||
+ | <code bash> | ||
+ | docker run -td ubuntu: | ||
+ | </ | ||
+ | |||
+ | Executing | ||
+ | <code bash> | ||
+ | docker exec -it ffffdfdfsdfsdfsfsffsdfs /bin/bash | ||
+ | </ | ||
+ | |||
+ | Nextcloud | ||
+ | <code bash> | ||
+ | docker run -d -p 80:80 rootlogin/ | ||
+ | docker run -v / | ||
+ | </ | ||
+ | |||
Debugging it | Debugging it | ||
<code bash> | <code bash> | ||
Line 702: | Line 408: | ||
| | ||
</ | </ | ||
+ | |||
Pull from repository | Pull from repository | ||
< | < | ||
Line 712: | Line 419: | ||
| | ||
</ | </ | ||
- | Pull specific tagged image | + | |
- | <code bash> | + | |
- | docker pull rootlogin/ | + | |
- | </ | + | |
Build from Dockerfile | Build from Dockerfile | ||
< | < | ||
Line 739: | Line 443: | ||
docker system prune -a | docker system prune -a | ||
</ | </ | ||
- | docker stop all container | + | |
- | <code bash> | + | |
- | docker stop (docker ps -a -q) | + | |
- | </ | + | |
prevent from auto start | prevent from auto start | ||
+ | |||
<code bash> | <code bash> | ||
docker update --restart=no client-iaro_db_1 | docker update --restart=no client-iaro_db_1 | ||
Line 1257: | Line 959: | ||
ngrep -q -W byline " | ngrep -q -W byline " | ||
</ | </ | ||
- | * sec | ||
- | * https:// | ||
- | * **tiger** - system sec scanner | ||
- | * sub domain evaluation | ||
- | * https:// | ||
- | * https:// | ||
- | * subfinder (passive, external sources) | ||
- | * vhost scanning | ||
- | * https:// | ||
- | * bettercap - wifi network | ||
- | * iodine dns tunnel https:// | ||
- | * command searchsploit in exploitdb | ||
* sys | * sys | ||
* **usbtop** | * **usbtop** | ||
Line 1352: | Line 1042: | ||
apply changes to system | apply changes to system | ||
- | < | + | < |
- | nixos-rebuild switch | + | sudo nixos-rebuild switch |
+ | sudo nixos-rebuild boot --flake '/ | ||
</ | </ | ||
Line 1511: | Line 1202: | ||
<code bash> | <code bash> | ||
+ | cd nixpkgs | ||
+ | nix build -f ./. python310Packages.baserow | ||
+ | nix build -f ./. nodePackages.hyperpotamus | ||
nix-build -E 'with import < | nix-build -E 'with import < | ||
- | nix-build -E 'with import / | ||
nix-build -E 'with import / | nix-build -E 'with import / | ||
+ | |||
</ | </ | ||
Line 1523: | Line 1217: | ||
</ | </ | ||
- | quick launch | + | run program |
<code bash> | <code bash> | ||
- | nix run nixpkgs.electrum --command | + | nix run nixpkgs#electrum |
+ | nix run github: | ||
+ | nix shell nixpkgs# | ||
</ | </ | ||
Line 1563: | Line 1259: | ||
{ | { | ||
- | disabledModules = [ " | + | disabledModules = [ |
+ | | ||
+ | " | ||
+ | | ||
imports = [ | imports = [ | ||
Line 1610: | Line 1309: | ||
< | < | ||
- | src = "/ | + | src = / |
- | dontUnpack = true; | + | |
- | | + | |
unpackPhase = '' | unpackPhase = '' | ||
</ | </ | ||
Line 1638: | Line 1335: | ||
rm -r $out/ | rm -r $out/ | ||
''; | ''; | ||
+ | }); | ||
+ | foo2zjs = super.foo2zjs.overrideAttrs (oldAttrs: rec { | ||
+ | src = builtins.fetchurl { | ||
+ | url = " | ||
+ | sha256 = " | ||
+ | }; | ||
+ | patches = (oldAttrs.patches or []) ++ [ | ||
+ | (pkgs.fetchpatch { | ||
+ | url = " | ||
+ | sha256 = " | ||
+ | }) | ||
+ | ]; | ||
}); | }); | ||
}) | }) | ||
Line 1647: | Line 1356: | ||
< | < | ||
patches = [ | patches = [ | ||
- | ./ | ||
- | |||
# Support HBPL1 printers https:// | # Support HBPL1 printers https:// | ||
./ | ./ | ||
Line 1657: | Line 1364: | ||
url = " | url = " | ||
sha256 = " | sha256 = " | ||
+ | stripLen = 1; | ||
+ | name = " | ||
}) | }) | ||
]; | ]; | ||
+ | </ | ||
+ | |||
+ | fetchpatch array | ||
+ | |||
+ | < | ||
+ | patches = map fetchpatch [ | ||
+ | /* This patch is currently necessary for the unit test suite to run correctly. | ||
+ | * See https:// | ||
+ | * and https:// | ||
+ | */ | ||
+ | #{ | ||
+ | # name = " | ||
+ | # sha256 = " | ||
+ | # url = " | ||
+ | #} | ||
+ | |||
+ | # This patch fixes test compile issues with glibc 2.33+. | ||
+ | #{ | ||
+ | # name = " | ||
+ | # sha256 = " | ||
+ | # url = " | ||
+ | #} | ||
</ | </ | ||
Line 1676: | Line 1407: | ||
<code bash> | <code bash> | ||
QEMU_NET_OPTS=" | QEMU_NET_OPTS=" | ||
+ | sudo -E QEMU_NET_OPTS=" | ||
</ | </ | ||
Line 1693: | Line 1425: | ||
}; | }; | ||
}; | }; | ||
+ | </ | ||
+ | |||
+ | nix repl | ||
+ | |||
+ | <code bash> | ||
+ | nix repl '< | ||
+ | # wordpressPackages.plugins.gutenberg.meta.license | ||
</ | </ | ||
==== packaging ==== | ==== packaging ==== | ||
Line 1737: | Line 1476: | ||
< | < | ||
{ lib | { lib | ||
- | , mkDerivation | + | , stdenv |
, fetchFromGitLab | , fetchFromGitLab | ||
, cmake | , cmake | ||
Line 1747: | Line 1486: | ||
}: | }: | ||
- | mkDerivation rec { | + | stdenv.mkDerivation rec { |
pname = " | pname = " | ||
version = " | version = " | ||
Line 1977: | Line 1716: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | packaging java / jar file | ||
+ | |||
+ | < | ||
+ | installPhase = '' | ||
+ | mkdir -p $out/ | ||
+ | cp ${src}/ | ||
+ | makeWrapper ${openjdk}/ | ||
+ | --add-flags "-jar $out/ | ||
+ | ''; | ||
+ | </ | ||
+ | ==== tests ==== | ||
+ | |||
+ | run tests interactively | ||
+ | |||
+ | <code bash> | ||
+ | nix build -L -f . nixosTests.invoiceplane.driverInteractive | ||
+ | ./ | ||
+ | > startAll | ||
+ | > testScript | ||
+ | > $machine-> | ||
+ | > print($machine-> | ||
+ | </ | ||
+ | |||
==== nixops ==== | ==== nixops ==== | ||
Line 2031: | Line 1794: | ||
fatlabel /dev/sdb1 " | fatlabel /dev/sdb1 " | ||
</ | </ | ||
+ | |||
resize extX partition | resize extX partition | ||
+ | |||
<code bash> | <code bash> | ||
sfdisk -l /dev/sdb | sfdisk -l /dev/sdb | ||
Line 2116: | Line 1881: | ||
</ | </ | ||
- | ===== avahi ===== | + | |
- | discover local services | + | |
- | <code bash> | + | |
- | avahi-browse --all --ignore-local --resolve --terminate | + | |
- | </ | + | |
===== curlftpfs ===== | ===== curlftpfs ===== | ||
<code bash> | <code bash> | ||
Line 2302: | Line 2063: | ||
qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | qemu-system-arm -M virt -m 512M -cpu cortex-a15 -kernel vmlinuz-lts -initrd initramfs-lts -append " | ||
</ | </ | ||
+ | |||
+ | ===== postgresql ===== | ||
+ | |||
+ | list all databases | ||
+ | <code bash> | ||
+ | sudo -u postgres psql | ||
+ | # \l | ||
+ | </ | ||
+ | |||
+ | drop database | ||
+ | <code bash> | ||
+ | sudo -u postgres psql | ||
+ | # drop database gitlabhq_production; | ||
+ | # drop database gitlabhq_production WITH (FORCE); | ||
+ | </ | ||
+ | |||
+ | list tables | ||
+ | <code bash> | ||
+ | sudo -u postgres psql | ||
+ | # \c gitlabhq_production | ||
+ | # \dt | ||
+ | </ | ||
+ | |||
+ | create and delete user | ||
+ | < | ||
+ | DROP ROLE gitlab; | ||
+ | CREATE USER gitlab WITH PASSWORD ' | ||
+ | </ | ||
+ | |||
+ | grant permissions | ||
+ | < | ||
+ | ALTER USER gitlab SUPERUSER; | ||
+ | CREATE DATABASE gitlabhq_production OWNER gitlab; | ||
+ | ALTER DATABASE gitlabhq_production OWNER TO gitlab; | ||
+ | </ | ||
+ | |||
+ | dump database | ||
+ | < | ||
+ | pg_dump -U gitlab gitlabhq_production > / | ||
+ | </ | ||
+ | |||
+ | dump all | ||
+ | < | ||
+ | pg_dumpall > / | ||
+ | </ | ||
+ | |||
+ | import database | ||
+ | < | ||
+ | psql# CREATE DATABASE gitlabhq_production; | ||
+ | psql -U gitlab gitlabhq_production < gitlab.pgsql | ||
+ | </ | ||
+ | |||
+ |