Instant one line setup FTP server

One line setup FTP server by The Swiss File Knife

  • I just found it … I needed to run some ftp server and do not waist time for setting all complicated configs for any popular FTP server
  • I wanted to have something similar to python -m SimpleHTTPServer 9191
  • I found The Swiss File Knife which provides ftp server
./sfk-linux.exe ftpserv -user=foo -pw=bar ./FTP_ROOT_DIRECTORY/
note : cannot bind on port 21, using alternative port 2121.
SFK Instant FTP 105. For help, type "sfk ftpserv -help".
waiting on port 2121, IP 10.10.10.10 or 11.11.11.11.
only read allowed. 60 sec timeout.

  • SFK is available for Windows, Linux, Mac

Markdown

This is a test of highlight level 1 with markdown

More about markdown you can find here

Level 2

List
* item 1
* item2

Tables

head 1 Head 2
1×1 1×2
2×2 2×2

 

The code for this is:

 

# This is a test of highlight level 1 with markdown 

More about markdown you can find [here](https://en.support.wordpress.com/markdown/)

## Level 2

List 
* item 1 
* item2

# Tables 

|head 1| Head 2|
|------|-------|
| 1x1 | 1x2 |
|2x2 |2x2 |

How to dump and restore Postgresql databases

Only dump

pg_dump –host HOST_1  –port 5432 –username SOURCE_db_username –schema SCHEMA_DO_BE_BACKED_UP –password –format custom –no-owner -x –no-privileges –blobs –verbose –file SCHEMA_BACKUP_DUMP_FILE.backup SOURCE_DB_NAME

Only Restore

Notice:
Target database must exist.

pg_restore –host HOST_2 –port 5432 –username TARGET_db_username –dbname TARGET_DB_NAME –password –no-owner -x –no-privileges –jobs 2 –verbose SCHEMA_BACKUP_DUMP_FILE.backup

Dump and restore with data streaming

env PGPASSWORD=source_db_user_pass –host=HOST_1 –port=5432 –schema SCHEMA_DO_BE_BACKED_UP –username=”source_db_username” –format=custom –no-owner -x –no-privileges source_db_name | env PGPASSWORD=target_db_user_pass pg_restore –host=HOST_2 –no-privileges –no-owner –no-tablespaces –verbose –username=target_db_username –dbname=target_db_name –clean